[Python-Dev] String literal concatenation & docstrings

Guido van Rossum gvanrossum at gmail.com
Mon Nov 29 01:55:54 CET 2004


> > Right.  Over-clarification results in docs that read like the
> > instructions for the holy hand grenade ;-)
> 
> Well said.

Except that now I can't find the adjacent string literals in the
grammar any more!

I'm looking al http://www.python.org/dev/doc/devel/ref/grammar.txt

The path goes from primary to atom to literal to stringliteral (and
from there on into lexical detail) and nowhere does the grammar show
that multiple string literals are allowed. Adding a single + after
stringliteral in the expansion for literal would fix this. Once that
is fixed, we could probably reduce the text of the offending section
somewhat to use the phrase "where allowed by the grammar" and skip the
mentioning of different quoting conventions or intervening whitespace.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list