From 92166452c13ae8882c30e61a6f5d7e7df17cdd9b Mon Sep 17 00:00:00 2001 From: rocky Date: Sun, 11 Dec 2016 08:22:26 -0500 Subject: [PATCH] two misc changes - track print_docstring move to help (used in python 3.1) - verify: allow RETURN_VALUE to match RETURN_END_IF --- uncompyle6/semantics/make_function.py | 2 +- uncompyle6/verify.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/uncompyle6/semantics/make_function.py b/uncompyle6/semantics/make_function.py index 0a941af3..ba49dbc6 100644 --- a/uncompyle6/semantics/make_function.py +++ b/uncompyle6/semantics/make_function.py @@ -219,7 +219,7 @@ def make_function3_annotate(self, node, isLambda, nested=1, if (len(code.co_consts) > 0 and code.co_consts[0] is not None and not isLambda): # ugly # docstring exists, dump it - self.print_docstring(indent, code.co_consts[0]) + print_docstring(self, indent, code.co_consts[0]) code._tokens = None # save memory assert ast == 'stmts' diff --git a/uncompyle6/verify.py b/uncompyle6/verify.py index 8fb8ce33..4d80bc95 100755 --- a/uncompyle6/verify.py +++ b/uncompyle6/verify.py @@ -319,6 +319,9 @@ def cmp_code_objects(version, is_pypy, code_obj1, code_obj2, elif tokens1[i1].type == 'LOAD_NAME' and tokens2[i2].type == 'LOAD_CONST' \ and tokens1[i1].pattr == 'None' and tokens2[i2].pattr is None: pass + elif tokens1[i1].type == 'RETURN_VALUE' and \ + tokens2[i2].type == 'RETURN_END_IF': + pass else: raise CmpErrorCode(name, tokens1[i1].offset, tokens1[i1], tokens2[i2], tokens1, tokens2)