Am 22.01.2012 16:50, schrieb Rick Johnson:
What does Python do when presented with this code?

py>  [line.strip('\n') for line in f.readlines()]

If Python reads all the file lines first and THEN iterates AGAIN to do
the strip; we are driving a Fred flintstone mobile. If however Python
strips each line of the lines passed into readlines in one fell swoop,
we made the correct choice.

Which is it Pythonistas? Which is it?

You aren't one (considering how vocal you are in arguing for changes to the language)?

So: shouldn't you be able to answer your own question?

--
--- Heiko.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to