Message329596
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. |
|
Date |
User |
Action |
Args |
2018-11-10 06:04:25 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, benjamin.peterson, pablogsal |
2018-11-10 06:04:25 | serhiy.storchaka | set | messageid: <1541829865.75.0.788709270274.issue35207@psf.upfronthosting.co.za> |
2018-11-10 06:04:25 | serhiy.storchaka | link | issue35207 messages |
2018-11-10 06:04:25 | serhiy.storchaka | create | |
|