Jul-13-2019, 12:39 PM
(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.