MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / items_view

Method items_view

tools/python-3.11.9-amd64/Lib/ast.py:708–716  ·  view source on GitHub ↗

Traverse and separate the given *items* with a comma and append it to the buffer. If *items* is a single item sequence, a trailing comma will be added.

(self, traverser, items)

Source from the content-addressed store, hash-verified

706 f(x)
707
708 def items_view(self, traverser, items):
709 """Traverse and separate the given *items* with a comma and append it to
710 the buffer. If *items* is a single item sequence, a trailing comma
711 will be added."""
712 if len(items) == 1:
713 traverser(items[0])
714 self.write(",")
715 else:
716 self.interleave(lambda: self.write(", "), traverser, items)
717
718 def maybe_newline(self):
719 """Adds a newline if it isn't the start of generated source"""

Callers 3

visit_ConstantMethod · 0.95
visit_TupleMethod · 0.95
visit_SubscriptMethod · 0.95

Calls 2

writeMethod · 0.95
interleaveMethod · 0.95

Tested by

no test coverage detected