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