MCPcopy
hub / github.com/rocky/python-uncompyle6 / call36_tuple

Function call36_tuple

uncompyle6/semantics/customize36.py:400–425  ·  view source on GitHub ↗

A tuple used in a call; these are like normal tuples, but they don't have the enclosing parenthesis.

(node)

Source from the content-addressed store, hash-verified

398 self.format_pos_args = format_pos_args
399
400 def call36_tuple(node):
401 """
402 A tuple used in a call; these are like normal tuples, but they
403 don't have the enclosing parenthesis.
404 """
405 assert node == "tuple"
406 # Note: don't iterate over last element which is a
407 # BUILD_TUPLE...
408 flat_elems = flatten_list(node[:-1])
409
410 self.indent_more(INDENT_PER_LEVEL)
411 sep = ""
412
413 for elem in flat_elems:
414 if elem in ("ROT_THREE", "EXTENDED_ARG"):
415 continue
416 assert elem == "expr"
417 line_number = self.line_number
418 value = self.traverse(elem)
419 if line_number != self.line_number:
420 sep += "\n" + self.indent + INDENT_PER_LEVEL[:-1]
421 self.write(sep, value)
422 sep = ", "
423
424 self.indent_less(INDENT_PER_LEVEL)
425 return len(flat_elems)
426
427 self.call36_tuple = call36_tuple
428

Callers

nothing calls this directly

Calls 5

flatten_listFunction · 0.90
indent_moreMethod · 0.80
indent_lessMethod · 0.80
traverseMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected