Re: [Python-Dev] Tuple pack/unpack and the definition of AST Assign nodes

2008-06-10 Thread Nick Coghlan
Thomas Lee wrote: Nick Coghlan wrote: I haven't looked at that code recently, but I believe the ADSL sequence in the assignment node is for statements where there are actually multiple assignment targets, such as: >>> p = x, y = 1, 2 >>> p, x, y ((1, 2), 1, 2) Cheers, Nick. Ah I see. A q

Re: [Python-Dev] Tuple pack/unpack and the definition of AST Assign nodes

2008-06-09 Thread Thomas Lee
Nick Coghlan wrote: I haven't looked at that code recently, but I believe the ADSL sequence in the assignment node is for statements where there are actually multiple assignment targets, such as: >>> p = x, y = 1, 2 >>> p, x, y ((1, 2), 1, 2) Cheers, Nick. Ah I see. A quick test verifies

Re: [Python-Dev] Tuple pack/unpack and the definition of AST Assign nodes

2008-06-09 Thread Nick Coghlan
Thomas Lee wrote: In porting one of the old peephole optimizations to the new AST compiler I noticed something weird going on with the following code: a, b, c = 1, 2, 3 Now, as you would expect this gets parsed into an Assign node. That Assign node looks like the following: Assign.targets =