pycdc icon indicating copy to clipboard operation
pycdc copied to clipboard

Python 2.6, 3.0 and 3.1 "withas" statement

Open rocky opened this issue 8 years ago • 0 comments

Similar but slightly different is the funky Python 2.6, 3.0 and 3.1 "with .. as" statements.

https://github.com/rocky/python-uncompyle6/blob/master/test/bytecode_3.1/04_withas.pyc fails. (Also the same thing is try for 2.6). The source code is https://github.com/rocky/python-uncompyle6/blob/master/test/simple_source/stmts/04_withas.py

Here's output from a run:

# Source Generated with Decompyle++
# File: 04_withas.pyc (Python 2.6)


def formatweekday(self):
Something TERRIBLE happened! No matching with block found for WITH_CLEANUP at 37

    try:
        encoding = _[1]
        return encoding
    finally:
        pass

rocky avatar Oct 25 '16 06:10 rocky