top | item 18871291

(no title)

rockybernstein | 7 years ago

"Does anyone use this": I use it in the "deparse" command of my Pytohn 3 debugger trepan3k ( https://pypi.org/project/trepan3k/#exact-location-informatio... ) and the corresponding Python 2 debugger trepan2.

See http://rocky.github.io/pycon2018.co/#/16 for a video showing use in this context.

As for round-tripping, I make use of that idea in testing the decompiler and/or looking for bugs (which are numerous). Python has an extensive test suite for its many library programs (in later versions in excesss of 800) which are largely written in Python.

The cool thing about a unit test program is that it is self checking.

uncompyle6 is far from perfect, so no, it doesn't roundrip all of the unit test programs that it could. (There are some unit test programs that are too fragile, like those that expect the line number to be exactly the same which might occur in tests testing a debugger).

The biggest problem as I've said many times is handling control flow properly. However that could be solved much better if someone who had more time to spend on this wanted to.

discuss

order

No comments yet.