strange behavor....

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Sat Nov 13 16:38:46 EST 2010


On Sat, 13 Nov 2010 05:50:40 -0800, alex23 wrote:

> Tracubik <affdfsdfds... at b.com> wrote:
>> why the integer value doesn't change while the list value do?
> 
> http://effbot.org/pyfaq/why-are-default-values-shared-between-
objects.htm


Right website, wrong page :)

http://effbot.org/zone/call-by-object.htm


See also Wikipedia's page on parameter passing conventions:

http://en.wikipedia.org/wiki/Evaluation_strategy


-- 
Steven



More information about the Python-list mailing list