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

Method flags

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

Source from the content-addressed store, hash-verified

220
221 @memoize
222 def flags(self) -> Optional[frozenset [str]]:
223 # flags: '(' ','.flag+ ')'
224 mark = self._mark()
225 if (
226 (literal := self.expect('('))
227 and
228 (a := self._gather_2())
229 and
230 (literal_1 := self.expect(')'))
231 ):
232 return frozenset ( a )
233 self._reset(mark)
234 return None
235
236 @memoize
237 def flag(self) -> Optional[str]:

Callers 1

ruleMethod · 0.95

Calls 3

_gather_2Method · 0.95
expectMethod · 0.45
_resetMethod · 0.45

Tested by

no test coverage detected