Are line continuations needed?
Peter Maas
peter.maas at mplusr.de
Wed Apr 7 12:08:01 EDT 2004
Russell Wallace wrote:
> Python lets you continue a single logical line across more than one
> physical line, either by putting a \ at the end or letting it happen
> automatically with an incomplete infix operator.
>
> I'm wondering how often is this feature needed? Would there be any
> problems if it weren't part of the language?
Just had this example:
d = { 'key1' : 'A very very long string of several hundred '\
'characters. I could use a multi-line string but '\
'then either left white space would be part of the '\
'string or I would have to align it at column 0 '\
'(ugly). I could embed it into a pair of brackets '\
'but I see no advantage over \\. Finally I could '\
'put this string on a single line (also ugly and hard '\
'to read).'
...
}
Mit freundlichen Gruessen,
Peter Maas
--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail peter.maas at mplusr.de
-------------------------------------------------------------------
More information about the Python-list
mailing list