Subject: bug#63622: lisp/progmodes/python.el: performance regression introduced by multiline font-lock

From: kobarity <[email-masked]>
Date: Wed, 24 May 2023 08:21:11 +0900

Hi Stefan and Tom,

Thank you very much for your confirmation.

Tom Gillespie wrote:
> While we're here I think [fF]? should probably be included in the prefix since
> format strings are also valid docstrings.

Is that so?  As far as I have tried, f-string does not seem to be a
docstring.

Python 3.11.3 (main, May  2 2023, 21:12:31) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> def f1():
...     "docstring"
...
>>> f1.__doc__
'docstring'
>>> def f2():
...     f"not docstring"
...
>>> f2.__doc__
>>> a = 1
>>> def f3():
...     f"not docstring {a}"
...
>>> f3.__doc__