[docs] [issue33878] Doc: Assignment statement to tuple or list: case missing.

Guido van Rossum report at bugs.python.org
Fri Nov 9 15:13:07 EST 2018


Guido van Rossum <guido at python.org> added the comment:

I would like to see this fixed.

On Fri, Nov 9, 2018 at 4:27 AM Serhiy Storchaka <report at bugs.python.org>
wrote:

>
> Serhiy Storchaka <storchaka+cpython at 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 <report at bugs.python.org>
> <https://bugs.python.org/issue33878>
> _______________________________________
>
-- 
--Guido (mobile)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33878>
_______________________________________


More information about the docs mailing list