What value should be passed to make a function use the default argument value?
Paul Rubin
http
Wed Oct 4 05:12:16 EDT 2006
"LaundroMat" <Laundro at gmail.com> writes:
> def f(var=1):
> return var*2
>
> What value do I have to pass to f() if I want it to evaluate var to 1?
> I know that f() will return 2, but what if I absolutely want to pass a
> value to f()? "None" doesn't seem to work..
I don't understand your question. You can call f(var=1) just fine.
More information about the Python-list
mailing list