diff --git a/.gitignore b/.gitignore index 88363be6..76e99b32 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ +*.pyo *.pyc *_dis *~ -*.pyc /.cache /.eggs /.python-version @@ -13,5 +13,6 @@ /nose-*.egg /tmp /uncompyle6.egg-info +/unpyc __pycache__ build diff --git a/README.rst b/README.rst index 46c1eb08..60b654f6 100644 --- a/README.rst +++ b/README.rst @@ -132,6 +132,7 @@ See Also * https://github.com/zrax/pycdc : supports all versions of Python and is written in C++ * https://code.google.com/archive/p/unpyc3/ : supports Python 3.2 only. The above projects use a different decompiling technique what is used here. +* https://github.com/figment/unpyc3/ : fork of above, but supports Python 3.2 only. Include some fixes like supporting function annotations * The HISTORY_ file. .. |downloads| image:: https://img.shields.io/pypi/dd/uncompyle6.svg diff --git a/test/bytecode_2.2/03_class_method.pyc b/test/bytecode_2.2/03_class_method.pyc index 03044567..08f9ed77 100644 Binary files a/test/bytecode_2.2/03_class_method.pyc and b/test/bytecode_2.2/03_class_method.pyc differ diff --git a/test/simple_source/def/03_class_method.py b/test/simple_source/def/03_class_method.py new file mode 100644 index 00000000..47d635d9 --- /dev/null +++ b/test/simple_source/def/03_class_method.py @@ -0,0 +1,13 @@ +# From Decompyle++ +# File: 22_class_method.pyc (Python 2.2) +# An old-style Python class. + +class MyClass: + + def method(self, i): + if i is 5: + print 'five' + elif not (i is 2): + print 'not two' + else: + print '2'