Files
python-uncompyle6/test/decompyle/test_loops.py
Markus Elfring 05761b0d46 Issue #363: Convert 14 statements to the usage of augmented assignments
Augmented assignment statements became available with Python 2.
https://docs.python.org/3/whatsnew/2.0.html#augmented-assignment

Thus adjust 14 source code places accordingly.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2021-11-02 11:25:04 +01:00

49 lines
683 B
Python

"""
test_loops.py -- source test pattern for loops
This source is part of the decompyle test suite.
decompyle is a Python byte-code decompiler
See http://www.goebel-consult.de/decompyle/ for download and
for further information
"""
for i in range(10):
if i == 3:
continue
if i == 5:
break
print i,
else:
print 'Else'
print
for i in range(10):
if i == 3:
continue
print i,
else:
print 'Else'
i = 0
while i < 10:
i += 1
if i == 3:
continue
if i == 5:
break
print i,
else:
print 'Else'
print
i = 0
while i < 10:
i += 1
if i == 3:
continue
print i,
else:
print 'Else'