Commit 21d0f992 authored by Stefan Behnel's avatar Stefan Behnel

extended test case

parent 1c4d20b8
...@@ -164,6 +164,19 @@ def test_first_assignment(): ...@@ -164,6 +164,19 @@ def test_first_assignment():
yield y yield y
yield (x,y) yield (x,y)
def test_swap_assignment():
"""
>>> gen = test_swap_assignment()
>>> next(gen)
(5, 10)
>>> next(gen)
(10, 5)
"""
x,y = 5,10
yield (x,y)
x,y = y,x # no ref-counting here
yield (x,y)
class Foo(object): class Foo(object):
""" """
......
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