Re: [Python-Dev] Wishlist: dowhile
14 Jun
2005
14 Jun
'05
12:09 p.m.
Jp Calderone writes:
Anything can be a for loop.
for chunk in iter(lambda: f1.read(CHUNK_SIZE), ''): f2.write(chunk)
Raymond responds:
It would be nice to have this encapsulated in a file method:
for chunk in f1.iterblocks(CHUNK_SIZE): f2.write(chunk)
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
7046
Age (days ago)
7046
Last active (days ago)
0 comments
1 participants
participants (1)
-
Michael Chermside