store_subscript precedence fix and...

Allow format specifier "%p" to indicate a nonterminal name,
like "%c" allows.

store_subscr -> store_subscript to match Python AST a little closer.
This commit is contained in:
rocky
2019-05-02 06:43:53 -04:00
parent 32bc017e2e
commit 293e7b0367
7 changed files with 127 additions and 94 deletions

View File

@@ -0,0 +1,11 @@
# From 3.6.8 idlelib/query.py
# Bug was handling parens around subscript
# RUNNABLE!
a = {'text': 1}
b = {'text': 3}
for widget, entry, expect in (
(a, b, 1),
(None, b, 3)
):
assert (widget or entry)['text'] == expect