wibiti/uncompyle2

Lambda with yield inside in Python 2.7

rocky opened this issue · 1 comments

rocky commented

This is from Python 2.7's test_collections.py:

def test_Iterable(self):
    return (lambda: (yield))()

which erroneously decompiles to:

def test_Iterable(self):
    return (lambda :     yield
None)()

rocky/python-uncompyle6@0c386d2 is my hacky fix for this. If you find something more elegant, let me know.

Should be fixed now.