You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Merge pull request #71 from jiangpengcheng/tupple_bug
tupples which contain only 1 element need a comma
This commit is contained in:
Binary file not shown.
@@ -5,3 +5,8 @@ def some_function():
|
||||
def some_other_function():
|
||||
some_variable, = some_function()
|
||||
print(some_variable)
|
||||
|
||||
empty_tup = ()
|
||||
one_item_tup = ("item1", )
|
||||
one_item_tup_without_parentheses = "item",
|
||||
many_items_tup = ("item1", "item2", "item3")
|
||||
|
@@ -924,6 +924,8 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
sep += ' '
|
||||
pass
|
||||
pass
|
||||
if len(tup) == 1:
|
||||
self.write(", ")
|
||||
self.write(')')
|
||||
|
||||
def n_LOAD_CONST(self, node):
|
||||
|
Reference in New Issue
Block a user