Re: evaluated function defaults: stored where?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: evaluated function defaults: stored where?

From: alex23 <wuwei23@gmail.com>
Date: Thu May 26 2005 - 08:16:07 CEST

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
Received on Thu Sep 29 16:14:05 2005