Memory leak when spawning
Tim Peters
tim_one at email.msn.com
Thu Feb 15 19:04:34 EST 2001
[Steve Purcell]
> Indeed. That got me thinking; is it defined how the following
> should work?
>
> (blah, blah, blah) = (1,2,3)
>
> I get blah == 3.
Yes, left-to-right is the defined order of sequence assignment.
> I won't lose sleep over it...
You would if you thought more about it <wink>. For example,
>>> a = [0]*5
>>> i, a[i] = 2, 666
>>> a
[0, 0, 666, 0, 0]
>>>
Python (unlike most other languages) defines this stuff so you don't get
surprises across releaess or platforms, but some people just can't resist
the temptation to *rely* on obscure side effects. Luckily, they're tracked
down and killed just as fast as the PSU finds t
More information about the Python-list
mailing list