Function: python--f-string-p
python--f-string-p is a byte-compiled function defined in
python.el.gz.
Signature
(python--f-string-p PPSS)
Documentation
Return non-nil if the pos where PPSS was found is inside an f-string.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python--f-string-p (ppss)
"Return non-nil if the pos where PPSS was found is inside an f-string."
(and (nth 3 ppss)
(let ((spos (1- (nth 8 ppss))))
(and (memq (char-after spos) '(?f ?F))
(or (< (point-min) spos)
(not (memq (char-syntax (char-before spos)) '(?w ?_))))))))