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

Method soft_keyword

Tools/peg_generator/pegen/parser.py:254–258  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

252
253 @memoize
254 def soft_keyword(self) -> tokenize.TokenInfo | None:
255 tok = self._tokenizer.peek()
256 if tok.type == token.NAME and tok.string in self.SOFT_KEYWORDS:
257 return self._tokenizer.getnext()
258 return None
259
260 @memoize
261 def expect(self, type: str) -> tokenize.TokenInfo | None:

Callers

nothing calls this directly

Calls 2

getnextMethod · 0.80
peekMethod · 0.45

Tested by

no test coverage detected