You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
BIN
test/bytecode_2.6_run/01_if_while_return.pyc
Normal file
BIN
test/bytecode_2.6_run/01_if_while_return.pyc
Normal file
Binary file not shown.
19
test/simple_source/bug26/01_if_while_return.py
Normal file
19
test/simple_source/bug26/01_if_while_return.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Issue #284 in Python 2.6
|
||||||
|
# See https://github.com/rocky/python-uncompyle6/issues/284
|
||||||
|
# Decompilation failed when return was the last statetement
|
||||||
|
# in the while loop inside the if block
|
||||||
|
|
||||||
|
# This code is RUNNABLE!
|
||||||
|
|
||||||
|
def f1():
|
||||||
|
if True:
|
||||||
|
while True:
|
||||||
|
return 5
|
||||||
|
|
||||||
|
def f2():
|
||||||
|
if True:
|
||||||
|
while 1:
|
||||||
|
return 6
|
||||||
|
|
||||||
|
|
||||||
|
assert f1() == 5 and f2() == 6
|
Reference in New Issue
Block a user