Multiline Strings confusion it tutorial

I wanted to point a bling guy to the Python wiki: http://wiki.python.org/moin/BeginnersGuide/Programmers/SimpleExamples#previe... and when reading a little bit, I found the entry on multiline strings. I found that example pretty contorted, because this is not a multiline string. Instead, there are multiple lines which define a single line string! Actually, the construct is even syntactically nothing else than a single line string which is handled by the parser, already. A multiline string is IMHO a string which value covers multiple lines, after whatever pre-processing was done. I don't think the given example is very helpful, but adds confusion. Where would I add such a complaint, usually? Or should I simply fix it? cheers - chris -- Christian Tismer :^) <mailto:tismer@stackless.com> Software Consulting : Have a break! Take a ride on Python's Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/ 14482 Potsdam : PGP key -> http://pgp.uni-mainz.de phone +49 173 24 18 776 fax +49 (30) 700143-0023 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/

On 04/12/2013 03:58 PM, Christian Tismer wrote:
I wanted to point a bling guy to the Python wiki:
http://wiki.python.org/moin/BeginnersGuide/Programmers/SimpleExamples#previe...
and when reading a little bit, I found the entry on multiline strings.
This entry? Defining multiline strings string = '''This is a string with embedded newlines. Also known as a tripled-quoted string. Whitespace at the beginning of lines is included, so the above line is indented but the others are not. '''
I found that example pretty contorted, because this is not a multiline string. Instead, there are multiple lines which define a single line string! Actually, the construct is even syntactically nothing else than a single line string which is handled by the parser, already.
That string has four (4) embedded '\n's -- that makes it multiline.
A multiline string is IMHO a string which value covers multiple lines, after whatever pre-processing was done. I don't think the given example is very helpful, but adds confusion.
And that string does cover multiple lines.
Where would I add such a complaint, usually? Or should I simply fix it?
Nothing broken here, move along, nothing to see... -- ~Ethan~

On 13/04/13 08:58, Christian Tismer wrote:
I wanted to point a bling guy to the Python wiki:
http://wiki.python.org/moin/BeginnersGuide/Programmers/SimpleExamples#previe... [...] Where would I add such a complaint, usually? Or should I simply fix it?
It's a wiki. You can fix it yourself, next time. I've done it this time. -- Steven
participants (3)
-
Christian Tismer
-
Ethan Furman
-
Steven D'Aprano