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

Method dedupe

Tools/peg_generator/pegen/parser_generator.py:208–215  ·  view source on GitHub ↗
(self, name: str)

Source from the content-addressed store, hash-verified

206 return name
207
208 def dedupe(self, name: str) -> str:
209 origname = name
210 counter = 0
211 while name in self.local_variable_names:
212 counter += 1
213 name = f"{origname}_{counter}"
214 self.local_variable_names.append(name)
215 return name
216
217
218class NullableVisitor(GrammarVisitor):

Callers 3

visit_NamedItemMethod · 0.80
add_varMethod · 0.80
visit_NamedItemMethod · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected