[issue28739] PEP 498: docstrings as f-strings
Terry J. Reedy
report at bugs.python.org
Sat Nov 26 15:33:54 EST 2016
Terry J. Reedy added the comment:
I withdraw my previously suggested addition to the Docstring glossary entry (msg281740). It implies that trivial f-strings are acceptable and I agree that other implementations and future Cpython should be free to strictly follow the literal meaning of the first sentence: docstring = initial string literal expression.
I suggest instead that 'string literal' in the first sentence link to https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals. This would make it clearer that 'string literal' is being used the the Python technical sense rather than in any more informal English sense.
We could possibly add a version of what Guido said above, such as: "(Acceptance of anything other than a string literal as a docstring is an implementation accident and should not be relied upon.)"
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28739>
_______________________________________
More information about the Python-bugs-list
mailing list