[issue40054] Allow formatted strings as docstrings

2020-03-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pytho

[issue40054] Allow formatted strings as docstrings

2020-03-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue28739 -- nosy: +xtreak ___ Python tracker ___ ___

[issue40054] Allow formatted strings as docstrings

2020-03-24 Thread Eric V. Smith
Eric V. Smith added the comment: The problem is that __doc__ is set at compile time, not run time. The ''.format call (and f-strings) are evaluated at run time. -- nosy: +eric.smith ___ Python tracker _

[issue40054] Allow formatted strings as docstrings

2020-03-24 Thread Richard Neumann
New submission from Richard Neumann : Currently only plain strings can be used as docstrings, such as: class Foo: """Spamm eggs.""" For dynamic class generation, it would be useful to allow format strings as docstrings as well: doc = 'eggs' class Foo: """Spamm {