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.

Author serhiy.storchaka
Recipients docs@python, gvanrossum, martin.panter, mdk, serhiy.storchaka
Date 2018-11-09.12:27:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1541766445.71.0.788709270274.issue33878@psf.upfronthosting.co.za>
In-reply-to
Content
I think that the fact that `(a) = 42` is accepted is rather an implementation detail, and the consequence of limitations of the grammar parser. It accepts arbitrary expression at the left hand side of assignment. After transforming CST to AST unsuitable targets are rejected, but information about grouping parenthesis is lost at this stage.

This can be fixed if check the left hand side node before converting to AST.
History
Date User Action Args
2018-11-09 12:27:25serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, docs@python, martin.panter, mdk
2018-11-09 12:27:25serhiy.storchakasetmessageid: <1541766445.71.0.788709270274.issue33878@psf.upfronthosting.co.za>
2018-11-09 12:27:25serhiy.storchakalinkissue33878 messages
2018-11-09 12:27:25serhiy.storchakacreate