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 benjamin.peterson, gvanrossum, pablogsal, serhiy.storchaka
Date 2018-11-10.06:04:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1541829865.75.0.788709270274.issue35207@psf.upfronthosting.co.za>
In-reply-to
Content
Actually, `(a) = 42` doesn't contradict the grammar.

assignment_stmt ::=  (target_list "=")+ (starred_expression | yield_expression)
target_list     ::=  target ("," target)* [","]
target          ::=  identifier
                     | "(" [target_list] ")"
                     | "[" [target_list] "]"
                     | attributeref
                     | subscription
                     | slicing
                     | "*" target

So that if we decide to disallow such things, we should change the definition in the language reference.

I thought the code should be similar to the code added in issue34641. But maybe there is a way to simplify both code.
History
Date User Action Args
2018-11-10 06:04:25serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, benjamin.peterson, pablogsal
2018-11-10 06:04:25serhiy.storchakasetmessageid: <1541829865.75.0.788709270274.issue35207@psf.upfronthosting.co.za>
2018-11-10 06:04:25serhiy.storchakalinkissue35207 messages
2018-11-10 06:04:25serhiy.storchakacreate