[issue37582] can you add this new feature about grammar?
Karthikeyan Singaravelan
report at bugs.python.org
Sat Jul 13 03:17:09 EDT 2019
Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:
Changes like this needs to be discussed in python-ideas first https://mail.python.org/mailman3/lists/python-ideas.python.org/ . The current behavior is as below :
>>> a, b += 1, 2
File "<stdin>", line 1
SyntaxError: illegal expression for augmented assignment
See also for some reference to the initial PEP proposal : https://stackoverflow.com/a/18132749/2610955
There is also a comment related to this where this error is raised https://github.com/python/cpython/blob/b9a0376b0dedf16a2f82fa43d851119d1f7a2707/Python/ast.c#L3302
Augmented assignments can only have a name, a subscript, or an
attribute on the left, though, so we have to explicitly check for
those.
I would propose closing this now and reopening this if there is some consensus on moving forward with this in python-ideas.
----------
nosy: +xtreak
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37582>
_______________________________________
More information about the Python-bugs-list
mailing list