Message281756
I don't really care that much, but I personally think that it would be more consistent (and a simpler rule) if *no* f-string (not even ones without substitutions) were to be allowed as docstrings.
In all other examples that Raymond shows it's the syntactic form that matters -- no on b-strings, yes on r-strings, yes on concatenation (using space), no on +, etc.
The language reference clearly defines f-strings as all strings with an f-prefix, and says that they *may* contain replacement fields. So it's clear that an f-string without replacements is still an f-string, and it is still distinguished from other strings. Hence I think it should not be allowed as a docstring.
(Also, what purpose could using the f-prefix for a docstring possibly have? All the other allowable combinations do have a use.) |
|
Date |
User |
Action |
Args |
2016-11-26 06:24:28 | gvanrossum | set | recipients:
+ gvanrossum, rhettinger, terry.reedy, eric.smith, ned.deily, martin.panter, yselivanov |
2016-11-26 06:24:28 | gvanrossum | set | messageid: <1480141468.51.0.145242571915.issue28739@psf.upfronthosting.co.za> |
2016-11-26 06:24:28 | gvanrossum | link | issue28739 messages |
2016-11-26 06:24:27 | gvanrossum | create | |
|