[issue33766] Grammar Incongruence

2018-06-03 Thread Isaac Elliott
Isaac Elliott added the comment: Cool, thanks for the help. Should I submit a PR with the updated documentation? -- ___ Python tracker <https://bugs.python.org/issue33

[issue33766] Grammar Incongruence

2018-06-03 Thread Isaac Elliott
Isaac Elliott added the comment: I went through that document before I created this issue. I can't find anything which describes this behavior - could you be more specific please? -- ___ Python tracker <https://bugs.python.org/is

[issue33766] Grammar Incongruence

2018-06-03 Thread Isaac Elliott
Isaac Elliott added the comment: Thanks for the clarification. Is there a reference to this in the documentation? -- ___ Python tracker <https://bugs.python.org/issue33

[issue33766] Grammar Incongruence

2018-06-03 Thread Isaac Elliott
New submission from Isaac Elliott : echo 'print("a");print("b")' > test.py This program is grammatically incorrect according to the specification (https://docs.python.org/3.8/reference/grammar.html). But Python 3 runs it without issue. It's this pr

[issue33149] Parser stack overflows

2018-03-26 Thread Isaac Elliott
Isaac Elliott added the comment: Because of the way recursive descent parsing works, [[ is actually the minimal input required to reproduce this in python3. In python2, the bug is still present, but

[issue33149] Parser stack overflows

2018-03-26 Thread Isaac Elliott
New submission from Isaac Elliott : python3's parser stack overflows on deeply-nested expressions, for ex

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-23 Thread Isaac Elliott
Isaac Elliott added the comment: Does backward compatibility take priority over correct behavior? What process is followed when fixing a bug causes a breaking change? -- ___ Python tracker <http://bugs.python.org/issue31

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-23 Thread Isaac Elliott
Isaac Elliott added the comment: Yes I would disallow a script such as `a = [0]; [5, a][1][:] = [3]` (note: your example of just `[5, a][1][:] = [3]` does not run, so I assumed it must be used in a situation like this) Evaluating the target of an assignment is unnecessary, we can syntactically

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-22 Thread Isaac Elliott
New submission from Isaac Elliott: In Python 3.5 and 3.6 (at least), the language reference presents a grammar that disallows assignment to literals. For example, `(a for 1 in [1,2,3])` is a syntax error, as is `(1, a) = (2, 3)`. However the grammar doesn't prevent assignment to subscr