[Python-bugs-list] [ python-Bugs-644345 ] Poor error message for augmented assign

noreply@sourceforge.net noreply@sourceforge.net
Tue, 26 Nov 2002 13:22:35 -0800


Bugs item #644345, was opened at 2002-11-26 13:22
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=644345&group_id=5470

Category: Parser/Compiler
Group: Python 2.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Brian Quinlan (bquinlan)
Assigned to: Nobody/Anonymous (nobody)
Summary: Poor error message for augmented assign

Initial Comment:
>>> [1,2] += [2,3]
SyntaxError: augmented assign to list not possible

A similar error message is generated when augmented 
assignment is used on tuple literals.

This error message is desceptive because augmented 
assignment is allowed on both of those types. 

I would change the message to:

SyntaxError: can't assign to literal

I may generate a patch for this, but not anytime soon.

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

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