*Literal* string concatenation has always been a part of Python :<br><a href="http://docs.python.org/reference/lexical_analysis.html#string-literal-concatenation">http://docs.python.org/reference/lexical_analysis.html#string-literal-concatenation</a><br>
<br><br><div class="gmail_quote">On Wed, Feb 11, 2009 at 12:06 PM, c d saunter <span dir="ltr"><<a href="mailto:christopher.saunter@durham.ac.uk">christopher.saunter@durham.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I did a double take when debugging an error the other day.  My<br>
problem was missing out a comma when building a list of strings.<br>
<br>
Much to my surprise the offending code still executed to cause<br>
problems later on:<br>
<br>
>>> txt = 'this', 'works'<br>
>>> print txt<br>
('this', 'works')<br>
# As expected<br>
>>> txt = 'this' 'works'<br>
>>> print txt<br>
thisworks<br>
# Eh?<br>
<br>
I have never seen this behaviour before, but it works in Python 2.2.1<br>
and 2.5.4 so I guess it's meant to be there.  I assume it is a feature<br>
of the compiler.<br>
<br>
Any thoughts?<br>
Regards<br>
Chris<br>
<font color="#888888"><br>
<br>
<br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br>