Il 23 May 2007 04:53:55 -0700, Siah ha scritto:

[cut]

No.

It's because the *body* of the function gets evaluated every time the
function is called, while the *definition* of the function gets evaluated
just once, when the function is 'declared'.

Your issue arises when the default value of the function (which is part of
the definition, not of the body) is a mutable object, because it's the very
same default value that gets modified at each time.


-- 
Alan Franzoni <[EMAIL PROTECTED]>
-
Togli .xyz dalla mia email per contattarmi.
Remove .xyz from my address in order to contact me.
-
GPG Key Fingerprint (Key ID = FE068F3E):
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to