'concatenating''strings'
Chris Liechti
cliechti at gmx.net
Thu Aug 8 14:26:02 EDT 2002
hwlgw at hotmail.com (Will Stuyvesant) wrote in
news:cb035744.0208081004.589ed61 at posting.google.com:
>>>> '''3'
> KeyboardInterrupt
>>>> # that did hang with the cursor on the next line so I had to press
> CTRL-c
you stared a triple quote string but not finished it.
> Totally unimportant but unexpected behaviour.
> Looks like you can not concatenate the empty string '' to 'something'
> without using the + operator.
thats documented behaviour:
http://python.org/doc/current/ref/string-catenation.html
likely stolen from C where this trick is important for macro magic. in
python its useful for longs strings to split them over multiple lines,
without including newlines (what a triple quote string would do)
chris
--
Chris <cliechti at gmx.net>
More information about the Python-list
mailing list