[Python-Dev] Wishlist: dowhile
mcherm at mcherm.com
Tue Jun 14 14:09:33 CEST 2005
Jp Calderone writes:
> Anything can be a for loop.
> for chunk in iter(lambda: f1.read(CHUNK_SIZE), ''):
> It would be nice to have this encapsulated in a file method:
> for chunk in f1.iterblocks(CHUNK_SIZE):
What ever happened to "Not every 3 line function needs to be a builtin"?
It's a common pattern. It's easy to do. Where's the problem?
-- Michael Chermside
More information about the Python-Dev