On 26 Jan 2009 14:51:33 GMT Marc 'BlackJack' Rintsch <bj_...@gmx.net> wrote:
> On Mon, 26 Jan 2009 12:22:18 +0000, Sion Arrowsmith wrote: > > > content = a.readlines() > > > > (Just because we can now write "for line in file" doesn't mean that > > readlines() is *totally* redundant.) > > But ``content = list(a)`` is shorter. :-) > But much less clear, wouldn't you say? content is now what? A list of lines? Characters? Bytes? I-Nodes? Dates? Granted, it can be inferred from the fact that a file is its own iterator over its lines, but that is a mental step that readlines() frees you from doing. My ~0.0154 €. /W -- My real email address is constructed by swapping the domain with the recipient (local part). -- http://mail.python.org/mailman/listinfo/python-list