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

Method positive_lookahead

Tools/peg_generator/pegen/parser.py:280–284  ·  view source on GitHub ↗
(self, func: Callable[..., T], *args: object)

Source from the content-addressed store, hash-verified

278 return res
279
280 def positive_lookahead(self, func: Callable[..., T], *args: object) -> T:
281 mark = self._mark()
282 ok = func(*args)
283 self._reset(mark)
284 return ok
285
286 def negative_lookahead(self, func: Callable[..., object], *args: object) -> bool:
287 mark = self._mark()

Callers

nothing calls this directly

Calls 2

funcFunction · 0.50
_resetMethod · 0.45

Tested by

no test coverage detected