diff --git a/.circleci/config.yml b/.circleci/config.yml index 9533f0b8..8faf8bbd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,11 +1,3 @@ -# This configuration was automatically generated from a CircleCI 1.0 config. -# It should include any build commands you had along with commands that CircleCI -# inferred from your project structure. We strongly recommend you read all the -# comments in this file to understand the structure of CircleCI 2.0, as the idiom -# for configuration has changed substantially in 2.0 to allow arbitrary jobs rather -# than the prescribed lifecycle of 1.0. In general, we recommend using this generated -# configuration as a reference rather than using it in production, though in most -# cases it should duplicate the execution of your original 1.0 config. version: 2 jobs: build: diff --git a/README.rst b/README.rst index 1e06befd..1002813a 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,5 @@ |buildstatus| |Pypi Installs| |Latest Version| |Supported Python Versions| - - |packagestatus| uncompyle6 @@ -15,7 +13,7 @@ Introduction ------------ *uncompyle6* translates Python bytecode back into equivalent Python -source code. It accepts bytecodes from Python version 1.3 to version +source code. It accepts bytecodes from Python version 1.0 to version 3.8, spanning over 24 years of Python releases. We include Dropbox's Python 2.5 bytecode and some PyPy bytecode. @@ -90,9 +88,9 @@ This uses setup.py, so it follows the standard Python routine: :: - pip install -e . # set up to run from source tree - # Or if you want to install instead - python setup.py install # may need sudo + $ pip install -e . # set up to run from source tree + # Or if you want to install instead + $ python setup.py install # may need sudo A GNU makefile is also provided so :code:`make install` (possibly as root or sudo) will do the steps above. diff --git a/test/bytecode_1.3/simple_const.pyc b/test/bytecode_1.3/simple_const.pyc new file mode 100644 index 00000000..6526c59a Binary files /dev/null and b/test/bytecode_1.3/simple_const.pyc differ diff --git a/uncompyle6/semantics/pysource.py b/uncompyle6/semantics/pysource.py index f32ad4e6..bcd0000d 100644 --- a/uncompyle6/semantics/pysource.py +++ b/uncompyle6/semantics/pysource.py @@ -2232,7 +2232,10 @@ class SourceWalker(GenericASTTraversal, object): # if lhs is not a UNPACK_TUPLE (or equiv.), # add parenteses to make this a tuple # if node[1][0] not in ('unpack', 'unpack_list'): - return "(" + self.traverse(node[1]) + ")" + result = self.traverse(node[1]) + if not (result.startswith("(") and result.endswith(")") ): + result = "(%s)" % result + return result # return self.traverse(node[1]) raise Exception("Can't find tuple parameter " + name)