Commit f42169b8 authored by Stefan Behnel's avatar Stefan Behnel

Add test that cascaded assignments support overwriting a variable that is still in use later.

parent 27b5adbb
......@@ -56,3 +56,15 @@ def test_cascaded_assignment_evaluate_expr():
"""
a = b = c = float(expr())
return a, b, c
def test_overwrite():
"""
>>> test_overwrite()
{0: {1: {2: {}}}}
"""
x = a = {}
for i in range(3):
a[i] = a = {}
assert a == {}
return x
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment