Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Returning a splat
#3
(Jul-13-2019, 12:27 PM)ichabod801 Wrote: The only thing I can think of is to rewrite bar so it can do the unpacking itself.

I was afraid that might be the answer. I failed to mention that bar is part of matplotlib, so that makes it a lot tougher.

To expand, foo makes the parameters for plt.legend()
bar is called as:
legend_params = foo(names, colors)
plt.legend(*legend_params)
In my quest for succinctness I may have over simplified my example. Wall
Reply


Messages In This Thread
Returning a splat - by Clunk_Head - Jul-13-2019, 12:22 PM
RE: Returning a splat - by ichabod801 - Jul-13-2019, 12:27 PM
RE: Returning a splat - by Clunk_Head - Jul-13-2019, 12:39 PM
RE: Returning a splat - by ichabod801 - Jul-13-2019, 12:42 PM
RE: Returning a splat - by Clunk_Head - Jul-13-2019, 01:01 PM
RE: Returning a splat - by ichabod801 - Jul-13-2019, 01:05 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020