def X(l=[]): weirdness. Python bug ?

Diez B. Roggisch deets at nospam.web.de
Fri Aug 22 05:42:03 EDT 2008


Wojtek Walczak schrieb:
> On Fri, 22 Aug 2008 11:13:52 +0200, Bart van Deenen wrote:
> 
>> I've stumbled onto a python behavior that I don't understand at all.
> ...
>> Does anyone have any pointers to the language documentation where this behavior is described?
> 
> Yes, it's documented in FAQ:
> http://www.python.org/doc/faq/general/
> Question 4.22.
> 

It's amazing. I didn't analyse this properly, but IMHO this issue is the 
single most asked question (or rather the effects in produces) on this list.

Maybe we should get *really* explicit in

http://docs.python.org/tut/node6.html#SECTION006710000000000000000

and

http://docs.python.org/ref/function.html

Big, red warnings, or some such.

Diez



More information about the Python-list mailing list