if statements

Alex Martelli aleax at aleax.it
Fri Jan 18 15:35:00 EST 2002


Skip Montanaro wrote:
        ...
>     Alex>     xmlstr = ( "<?xml version='1.0'?>"
>     Alex>         + "<config"
>     Alex>         + "last_server=\"0\""
> 
>     Alex> and so on, just close the ) when done to terminate the logical
>     Alex> line.
> 
> I suspect Alex intended to delete the plus signs.  As long as what you

Actually, I should have indicated both the version with the + signs
(more general, as the "pieces" may be of any kind, including both literals 
and non-literals; microscopically slower, as there IS indeed a runtime
operation which, if you only have literals, is saved by omitting the +)
and that without.

Thanks, Skip, for catching the incompleteness of my advice.

Alex



More information about the Python-list mailing list