MCPcopy Index your code
hub / github.com/python/cpython / visit_Constant

Method visit_Constant

Lib/_ast_unparse.py:705–715  ·  view source on GitHub ↗
(self, node)

Source from the content-addressed store, hash-verified

703 self.write(repr(value))
704
705 def visit_Constant(self, node):
706 value = node.value
707 if isinstance(value, tuple):
708 with self.delimit("(", ")"):
709 self.items_view(self._write_constant, value)
710 elif value is ...:
711 self.write("...")
712 else:
713 if node.kind == "u":
714 self.write("u")
715 self._write_constant(node.value)
716
717 def visit_List(self, node):
718 with self.delimit("[", "]"):

Callers

nothing calls this directly

Calls 4

delimitMethod · 0.95
items_viewMethod · 0.95
writeMethod · 0.95
_write_constantMethod · 0.95

Tested by

no test coverage detected