[Python-3000] Lines breaking
g.brandl at gmx.net
Tue May 29 12:51:59 CEST 2007
Ka-Ping Yee schrieb:
> On Tue, 29 May 2007, [UTF-8] Ivan Krsti�^G wrote:
>> Guido van Rossum wrote:
>> > What would that do?
>> It would split on all separators in the tuple, so
Exactly, just like .startswith() with a tuple tries all of the elements.
>> x.split(("\r", "\n"))
>> would do the same thing that x.splitlines() does now.
> Hmm... would it? Or should two split points with nothing between
> them produce empty strings, i.e. you would have to do
> x.split(('\r\n', '\r', '\n'))
> to get the behaviour of x.splitlines()?
Yes, that would be the correct analogon. Sorry, I should have made that
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.
More information about the Python-3000