[Python-bugs-list] [ python-Bugs-644345 ] Poor error message for augmented assign
SourceForge.net
noreply@sourceforge.net
Wed, 21 May 2003 21:05:07 -0700
Bugs item #644345, was opened at 2002-11-26 13:22
Message generated for change (Comment added) made by bcannon
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: Jeremy Hylton (jhylton)
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.
----------------------------------------------------------------------
>Comment By: Brett Cannon (bcannon)
Date: 2003-05-21 21:05
Message:
Logged In: YES
user_id=357491
I like Neal's suggestion.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2002-12-31 05:16
Message:
Logged In: YES
user_id=33168
Jeremy, do you agree? How about adding the word literal to
the error msg, so it reads:
* augmented assign to literal list not possible
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=644345&group_id=5470