question od default args
bokr at oz.net
Sat Jun 29 18:38:24 CEST 2002
On Sat, 29 Jun 2002 12:32:02 GMT, "Fredrik Lundh" <fredrik at pythonware.com> wrote:
>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...
Perhaps accessing "implementation details" should depend on importing
a module that enables access one way or another? E.g.,
could serve to signal that Guido et al didn't really
mean to define a portable abstraction for production use?
More information about the Python-list