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 <rep...@bugs.python.org>
<http://bugs.python.org/issue28739>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to