evaluated function defaults: stored where?

alex23 wuwei23 at gmail.com
Thu May 26 02:16:07 EDT 2005


I wrote: (some guff on default parameters)

Of course, it helps if I actually include the alternative function's
code:

>>> def foo(a, b = None):
... 	if b == None: b = []
... 	b.append(a)
... 	return b

Sorry about that :)

-alex23




More information about the Python-list mailing list