[Python-ideas] Implicit string literal concatenation considered harmful?
Jim Jewett
jimjjewett at gmail.com
Tue May 21 06:07:33 CEST 2013
On Sat, May 18, 2013 at 4:35 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> ... Normally you don't just create
> a string and do nothing with it.
I do. Or, rather, I assign it to a temp name, and then use that temp
name in the next line -- temp variables seems less ugly than line
continuations.
> I think I have found the fatal problem with that suggestion: it rules out
> using concatenation in docstrings at all.
I think a better solution would be to loosen the requirements for docstrings.
Reasonably harmless proposals include
(1) Always use the first expression, if it isn't a statement.
(2) str( < the above > )
(3) Special treatment for __doc__, such as __doc__ = ...
-jJ
More information about the Python-ideas
mailing list