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

Class Repeat0

Tools/peg_generator/pegen/grammar.py:270–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268
269
270class Repeat0(Repeat):
271 def __str__(self) -> str:
272 s = str(self.node)
273 # TODO: Decide whether to use (X)* or X* based on type of X
274 if " " in s:
275 return f"({s})*"
276 else:
277 return f"{s}*"
278
279 def __repr__(self) -> str:
280 return f"Repeat0({self.node!r})"
281
282
283class Repeat1(Repeat):

Callers 1

itemMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…