[ python-Bugs-988613 ] compiler.transformer and tuple unpacking

SourceForge.net noreply at sourceforge.net
Mon Jul 12 15:17:47 CEST 2004


Bugs item #988613, was opened at 2004-07-10 21:03
Message generated for change (Comment added) made by mwh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=988613&group_id=5470

Category: Parser/Compiler
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Felix Wiemann (felixwiemann)
>Assigned to: Michael Hudson (mwh)
Summary: compiler.transformer and tuple unpacking

Initial Comment:
compiler.transformer.parse chokes on tuple unpacking
when parentheses are present.

To reproduce, try:

import compiler.transformer
compiler.transformer.parse('(a, b) = 1, 2')

... in Python 2.3 and Python 2.4.  It works in Python
2.3. In Python 2.4, it causes a SyntaxError "bad
assignment".

It works in both Python versions when omitting the
parentheses, i.e. using 'a, b = 1, 2' instead.

----------------------------------------------------------------------

>Comment By: Michael Hudson (mwh)
Date: 2004-07-12 14:17

Message:
Logged In: YES 
user_id=6656

Fixed by applying the mentioned patch.

----------------------------------------------------------------------

Comment By: John Ehresman (jpe)
Date: 2004-07-11 00:48

Message:
Logged In: YES 
user_id=22785

I've uploaded patch #988698 to fix this

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=988613&group_id=5470


More information about the Python-bugs-list mailing list