Is it explicitly specified?
usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Sun Feb 3 13:34:34 CET 2008
mario ruggier wrote:
> It may sometimes be useful to make use of the conceptual
> difference between these two cases, that is that in one case the
> user did not specify any key and in the other the user explicitly
> specified the key to be None.
Do you have an example where this might be useful?
> Is there any way to tell this difference from within the called
> function? And if so, would there be any strong reasons to not rely
> on this difference?
IMHO, it's "magic".
> Would it be maybe a little abusive of what a keyword arg actually
No, but you'd have to explain to users why it behaves like this. I
wouldn't expect this behaviour. If the function signature says the
default value for "key" is None, I expect it to behave the same no
matter if I leave out "key" or if I set it explicitly.
BOFH excuse #307:
emissions from GSM-phones
More information about the Python-list