Python 3000 idea: reversing the order of chained assignments

Duncan Booth duncan.booth at invalid.invalid
Thu Mar 22 09:23:08 EDT 2007


Steve Holden <steve at holdenweb.com> wrote:

>> As a matter of interest do PyLint or PyChecker check for this situation 
>> (chained assignment where the target of an assignment is also a 
>> subexpression of a later assignment)?
>> 
> Where's the published syntax for chained assignment?

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

More specifically, since you seem to have missed it, it's the '+' in the 
line:

assignment_stmt  	::=  	(target_list "=")+ expression_list

And then the clear statement "assigns the single resulting object to each 
of the target lists, from left to right".



More information about the Python-list mailing list