Looking under Python's hood: Will we find a high performance or clunky engine?

Joshua Landau joshua.landau.ws at gmail.com
Sun Jan 22 16:18:06 EST 2012


On 22 January 2012 20:57, Michael Poeltl <michael.poeltl at univie.ac.at>wrote:

> > Two iterations.  And since that is the only possible way to do this, you
> > are correct, the language is terribly archaic.  I suggest you switch to
> > Ruby ASAP.
> why there is only one possibility to do so? in a second i found this
> ''.join(open('test').readlines()).split('\n')
>
> and if you don't like python, then stick to ruby. who cares???


I'm pretty sure that was sarcasm, but as was said before ".readlines()" is
superfluous and the original comment was wrong.

''.join(open('test').readlines()).split('\n')
==
''.join(open('test')).split('\n')
==
open('test').read().split('\n')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120122/5be773b8/attachment-0001.html>


More information about the Python-list mailing list