You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Merge branch 'python-3.3-to-3.5' into python-2.4
This commit is contained in:
BIN
test/bytecode_2.5_run/05_long_literals24.pyc
Normal file
BIN
test/bytecode_2.5_run/05_long_literals24.pyc
Normal file
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2019-2021 by Rocky Bernstein
|
||||
# Copyright (c) 2019-2022 by Rocky Bernstein
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -32,6 +32,7 @@ from uncompyle6.semantics.helper import (
|
||||
find_none,
|
||||
zip_longest
|
||||
)
|
||||
|
||||
from uncompyle6.show import maybe_show_tree_param_default
|
||||
|
||||
|
||||
@@ -248,7 +249,9 @@ def make_function36(self, node, is_lambda, nested=1, code_node=None):
|
||||
self.write(", ")
|
||||
ends_in_comma = True
|
||||
|
||||
ann_dict = kw_dict = default_tup = None
|
||||
# ann_dict = kw_dict = default_tup = None
|
||||
kw_dict = None
|
||||
|
||||
fn_bits = node[-1].attr
|
||||
# Skip over:
|
||||
# MAKE_FUNCTION,
|
||||
|
@@ -233,7 +233,10 @@ class NonterminalActions:
|
||||
assert len(keys) == len(flat_elems) - 1
|
||||
for i, elem in enumerate(flat_elems[:-1]):
|
||||
assert elem.kind == "ADD_VALUE"
|
||||
value = elem.pattr
|
||||
try:
|
||||
value = "%r" % elem.pattr
|
||||
except Exception:
|
||||
value = elem.pattr
|
||||
if elem.linestart is not None:
|
||||
if elem.linestart != self.line_number:
|
||||
next_indent = self.indent + INDENT_PER_LEVEL[:-1]
|
||||
@@ -255,7 +258,10 @@ class NonterminalActions:
|
||||
else:
|
||||
for elem in flat_elems:
|
||||
assert elem.kind == "ADD_VALUE"
|
||||
value = elem.pattr
|
||||
try:
|
||||
value = "%r" % elem.pattr
|
||||
except Exception:
|
||||
value = elem.pattr
|
||||
if elem.linestart is not None:
|
||||
if elem.linestart != self.line_number:
|
||||
next_indent = self.indent + INDENT_PER_LEVEL[:-1]
|
||||
|
Reference in New Issue
Block a user