This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: compiler.transformer and tuple unpacking
Type: Stage:
Components: Interpreter Core Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: mwh Nosy List: felixwiemann, jpe, mwh
Priority: normal Keywords:

Created on 2004-07-10 20:03 by felixwiemann, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
transformer_tuple felixwiemann, 2004-07-10 20:03 Behaviour of Python 2.3 and Python 2.4
Messages (3)
msg21480 - (view) Author: Felix Wiemann (felixwiemann) Date: 2004-07-10 20:03
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.
msg21481 - (view) Author: John Ehresman (jpe) * Date: 2004-07-10 23:48
Logged In: YES 
user_id=22785

I've uploaded patch #988698 to fix this
msg21482 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-07-12 13:17
Logged In: YES 
user_id=6656

Fixed by applying the mentioned patch.
History
Date User Action Args
2022-04-11 14:56:05adminsetgithub: 40536
2004-07-10 20:03:33felixwiemanncreate