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

Method items

Tools/peg_generator/pegen/grammar_parser.py:328–343  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

326
327 @memoize
328 def items(self) -> Optional[NamedItemList]:
329 # items: named_item items | named_item
330 mark = self._mark()
331 if (
332 (named_item := self.named_item())
333 and
334 (items := self.items())
335 ):
336 return [named_item] + items
337 self._reset(mark)
338 if (
339 (named_item := self.named_item())
340 ):
341 return [named_item]
342 self._reset(mark)
343 return None
344
345 @memoize
346 def named_item(self) -> Optional[NamedItem]:

Callers 15

altMethod · 0.95
write_opcode_targetsFunction · 0.45
generate_opcode_headerFunction · 0.45
dumpMethod · 0.45
generate_recorder_tablesFunction · 0.45
generate_oparg_macrosFunction · 0.45
generate_expansion_tableFunction · 0.45
generate_opmapFunction · 0.45
lexer.pyFile · 0.45
generate_tier2Function · 0.45
generate_tier1_labelsFunction · 0.45

Calls 2

named_itemMethod · 0.95
_resetMethod · 0.45

Tested by 1

print_memstatsFunction · 0.36