"in" for dicts (was: Python 2.1 function attributes)
Thomas Wouters
thomas at xs4all.net
Tue Jan 30 03:56:51 EST 2001
On Mon, Jan 29, 2001 at 07:19:42AM -0500, Tim Peters wrote:
> for line in f.readlines():
> would have been almost infinitely preferable, had we been able to dream up a
> reasonable way to do that lazily that wouldn't break some existing code.
> But we couldn't.
I disagree. We could have (using a lazy wrapper class/type), but Guido
didn't want to change the return type of f.readlines(). It would have been
more trouble, and it would have opened the door for a lot more fake-lists,
but I still don't think it would have broken much code :)
--
Thomas Wouters <thomas at xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
More information about the Python-list
mailing list