n00b question on spacing

Ned Deily nad at acm.org
Sat Jun 22 15:34:11 EDT 2013


In article 
<CAMjeLr9iQ2Yg_YF0cSD2a9fK5upSgK42wZeNN9R8Ee2-rWKzGA at mail.gmail.com>,
 Mark Janssen <dreamingforward at gmail.com> wrote:
> > Also remember when entering long lines of text that strings concatenate
> > within parenthesis.
> > So,
> > ("a, b, c"
> > "d, e, f"
> > "g, h, i")
> >
> > Is the same as ("a, b, cd, e, fg, h, i") 
> There was a recent discussion about this (under "implicit string
> concatenation").  It seems this is a part of the python language
> specification that was simply undefined.   (A rule probably should be
> added to the lexer to make this explicit.)

This behavior is explicitly defined in the Python Language Reference:

http://docs.python.org/3/reference/lexical_analysis.html#string-literal-c
oncatenation

-- 
 Ned Deily,
 nad at acm.org




More information about the Python-list mailing list