diff options
Diffstat (limited to 'tests/basics/seq_unpack.py')
-rw-r--r-- | tests/basics/seq_unpack.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/basics/seq_unpack.py b/tests/basics/seq_unpack.py index af8b998d0..084ddb9f1 100644 --- a/tests/basics/seq_unpack.py +++ b/tests/basics/seq_unpack.py @@ -14,6 +14,13 @@ print(a, b) [a, b] = 100, 200 print(a, b) +# optimised 3-way swap +a = 1 +b = 2 +c = 3 +a, b, c = b, c, a +print(a, b, c) + try: a, b, c = (1, 2) except ValueError: |