Author gvanrossum
Recipients eric.smith, gvanrossum, martin.panter, ned.deily, rhettinger, terry.reedy, yselivanov
Date 2016-11-26.06:24:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480141468.51.0.145242571915.issue28739@psf.upfronthosting.co.za>
In-reply-to
Content
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.)
History
Date User Action Args
2016-11-26 06:24:28gvanrossumsetrecipients: + gvanrossum, rhettinger, terry.reedy, eric.smith, ned.deily, martin.panter, yselivanov
2016-11-26 06:24:28gvanrossumsetmessageid: <1480141468.51.0.145242571915.issue28739@psf.upfronthosting.co.za>
2016-11-26 06:24:28gvanrossumlinkissue28739 messages
2016-11-26 06:24:27gvanrossumcreate