MCPcopy Create free account
hub / github.com/python/cpython / NameLeaf

Class NameLeaf

Tools/peg_generator/pegen/grammar.py:116–125  ·  view source on GitHub ↗

The value is the name.

Source from the content-addressed store, hash-verified

114
115
116class NameLeaf(Leaf):
117 """The value is the name."""
118
119 def __str__(self) -> str:
120 if self.value == "ENDMARKER":
121 return "$"
122 return super().__str__()
123
124 def __repr__(self) -> str:
125 return f"NameLeaf({self.value!r})"
126
127
128class StringLeaf(Leaf):

Callers 3

altMethod · 0.90
atomMethod · 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…