question od default args
fredrik at pythonware.com
Sat Jun 29 14:32:02 CEST 2002
Mark Jackson wrote:
> More quickly:
> def myfunc(arg=):
> if arg is myfunc.func_defaults:
> print "no argument"
while the func_ attributes are documented, a quick peek in
the standard library should tell you that it's best to treat them
as an implementation detail.
the less such stuff you depend on in your production code,
the more portable it gets...
More information about the Python-list