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

SourceForge.net noreply at sourceforge.net
Sun Jul 11 01:48:40 CEST 2004


Bugs item #988613, was opened at 2004-07-10 20:03
Message generated for change (Comment added) made by jpe
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: Open
Resolution: None
Priority: 5
Submitted By: Felix Wiemann (felixwiemann)
Assigned to: Nobody/Anonymous (nobody)
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: John Ehresman (jpe)
Date: 2004-07-10 23: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