Better 1.5 parameter tuple handling...

Tidy README.rst
This commit is contained in:
rocky
2019-10-10 17:20:00 -04:00
parent f0f9676f52
commit 0cf32f1b70
4 changed files with 8 additions and 15 deletions

View File

@@ -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)