Same function but different names with different set of default arguments
Paulo da Silva
p_s_d_a_s_i_l_v_a_ns at netcabo.pt
Sat Jan 23 15:03:43 EST 2016
Às 07:30 de 21-01-2016, Paulo da Silva escreveu:
> Hi all.
>
> What is the fastest implementation of the following code?
>
> def g(p):
> ...
> return something
>
> def f1(p="p1"):
> return g(p)
>
> def f2(p="p2"):
> return g(p)
>
Thanks to all who responded.
I'll try "partial" in my case.
It seems good and simple.
Paulo
More information about the Python-list
mailing list