Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
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. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35207> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com