Mysterie / uncompyle2

uncompyle2
642 stars 148 forks source link

Code section could not be decompiled #5

Closed johnp closed 11 years ago

johnp commented 11 years ago

This code section (Python 2.6, I don't have the original source code) could not be decompiled:

def _almostZero--- This code section failed: ---

0   LOAD_FAST         'epsilon'
3   UNARY_NEGATIVE    None
4   LOAD_FAST         'val'
7   DUP_TOP           None
8   ROT_THREE         None
9   COMPARE_OP        '<'
12  JUMP_IF_FALSE     '22'
15  LOAD_FAST         'epsilon'
18  COMPARE_OP        '<'
21  RETURN_END_IF     None
22  ROT_TWO           None
23  POP_TOP           None
24  RETURN_VALUE      None
-1  RETURN_LAST       None

Syntax error at or near `RETURN_END_IF' token at offset 21

I'll sent you a mail with the .pyc.

hedger commented 11 years ago

I see what you did there.

xvortex commented 11 years ago

here is original function, for reference:

def _almostZero(val, epsilon = 0.0004):     return -epsilon < val < epsilon

Mysterie commented 11 years ago

Thank you for the report and source code. This bug is patched. https://github.com/Mysterie/uncompyle2/commit/0d3fa565eac5c119ba582a9918fa3ca35a1fe28d