On 6/15/05, Benji York [EMAIL PROTECTED] wrote:
Steven Bethard wrote:
I would prefer that the alternate iter() form was broken off into
another separate function, say, iterfunc(), that would let me write
Jp's solution something like:
for chunk in iterfunc('', f1.read, CHUNK_SIZE):
On Jun 16, 2005, at 10:50 AM, Steven Bethard wrote:
On 6/15/05, Benji York [EMAIL PROTECTED] wrote:
Steven Bethard wrote:
I would prefer that the alternate iter() form was broken off into
another separate function, say, iterfunc(), that would let me write
Jp's solution something like:
Jp Calderone:
for chunk in iter(lambda: f1.read(CHUNK_SIZE), ''):
f2.write(chunk)
Phillip J. Eby:
More seriously, I think your translation makes an excellent argument in
*favor* of having a do/while statement for greater clarity. :)
Michael Chermside
Interesting... I had the opposite