1 Equivalent code
R. Bernstein edited this page 2017-01-26 15:37:23 -05:00

Below are real constructs we have seen that confuse bytecode verification.

if ... return vs if .. return; else

if x: 
   # some code ...
   return 
# some other code ...

vs.

if x: 
   # some code
else: 
   # some other code

and versus if then

a and b

vs.

if a: 
   b

Expression simplification in code

if 1 or 0:
   ...

vs.

if 1:
   ...

Constant folding:

x = 1 + 2

vs

x = 3