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

Method fstring_middle

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

Source from the content-addressed store, hash-verified

218
219 @memoize
220 def fstring_middle(self) -> tokenize.TokenInfo | None:
221 FSTRING_MIDDLE = getattr(token, "FSTRING_MIDDLE", None)
222 if not FSTRING_MIDDLE:
223 return None
224 tok = self._tokenizer.peek()
225 if tok.type == FSTRING_MIDDLE:
226 return self._tokenizer.getnext()
227 return None
228
229 @memoize
230 def fstring_end(self) -> tokenize.TokenInfo | None:

Callers 1

target_atomMethod · 0.80

Calls 2

getnextMethod · 0.80
peekMethod · 0.45

Tested by

no test coverage detected