Fixed one thing in Python 2.7 and break another.

We'll go with this until we get to a more serious refactoring.
This commit is contained in:
rocky
2019-01-05 16:38:07 -05:00
parent fbf51a0ae3
commit df105fbfb2
5 changed files with 34 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
# Bug in Python 2.7 is code creating a (useless) JUMP_ABSOLUTE to the instruction right after
# the "raise" which causes the
# RUNNABLE!
def testit(a, b):
if a:
if not b:
raise AssertionError("test JUMP_ABSOLUTE to next instruction")
def testit2(a, b):
if a:
if not b:
raise AssertionError("test with dead code after raise")
x = 10
testit(False, True)
testit(False, False)
testit(True, True)
testit2(False, True)
testit2(False, False)
testit2(True, True)