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

Method _gather_2

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

Source from the content-addressed store, hash-verified

689
690 @memoize
691 def _gather_2(self) -> Optional[Any]:
692 # _gather_2: flag _loop0_1
693 mark = self._mark()
694 if (
695 (elem := self.flag())
696 is not None
697 and
698 (seq := self._loop0_1())
699 is not None
700 ):
701 return [elem] + seq
702 self._reset(mark)
703 return None
704
705 KEYWORDS = ()
706 SOFT_KEYWORDS = ()

Callers 1

flagsMethod · 0.95

Calls 3

flagMethod · 0.95
_loop0_1Method · 0.95
_resetMethod · 0.45

Tested by

no test coverage detected