[Python-3000] Lines breaking
"Martin v. Löwis"
martin at v.loewis.de
Tue May 29 08:59:48 CEST 2007
> Heh, just today I was wondering if we should kill splitlines:
>
> $ grep splitlines `find Lib -name '*.py'` | egrep -v
> '(difflib|/test/|UserString)' | wc
> 24 111 1653
> $ egrep 'split[^l]' `find Lib -name '*.py'` | egrep -v
> '(difflib|/test/|UserString)' | wc
> 916 4943 63104
>
> splitlines() is pretty lightly used. split() has many uses (not
> surprising).
However, I think that splitlines should work consistently with
readlines (for some definition of "consistent").
Regards,
Martin
More information about the Python-3000
mailing list