Python 3000 idea: reversing the order of chained assignments

Steve Holden steve at holdenweb.com
Wed Mar 21 21:24:04 EDT 2007


Marcin Ciura wrote:
> Steven D'Aprano wrote:
>>>>> x, y, z = 1, 2, 3
>>>>> x = y = z
>>>>> x, y, z
>> (3, 3, 3)
>>
>> I certainly wouldn't expect to get (2, 3, 3).
> 
> Neither would I. I must have expressed myself not clearly enough.
> Currently
> x = y = z
> is roughly equivalent to
> x = z
> y = z
> I propose to change it to
> y = z
> x = z
> Cheers,
>    Marcin

The difference being ... ?
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb     http://del.icio.us/steve.holden
Recent Ramblings       http://holdenweb.blogspot.com




More information about the Python-list mailing list