Files
python-uncompyle6/test/simple_source/expression/04_subscript.py
2019-05-02 11:44:20 -04:00

16 lines
426 B
Python

# From 3.6.8 idlelib/query.py
# Bug was handling parenthesis around subscript in an assignment.
# RUNNABLE!
a = {'text': 1}
b = {'text': 3}
for widget, entry, expect in (
(a, b, 1),
(None, b, 3)
):
assert (widget or entry)['text'] == expect
(widget or entry)['text'] = 'A'
assert a['text'] == 'A', "a[text] = %s != 'A'" % a['text']
assert b['text'] == 'A', "a[text] = %s != 'A'" % b['text']