Re: [Python-Dev] iter alternate form and *args and **kwargs (Was: Wishlist: dowhile)

2005-06-16 Thread Steven Bethard
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):

Re: [Python-Dev] iter alternate form and *args and **kwargs (Was: Wishlist: dowhile)

2005-06-16 Thread James Y Knight
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:

[Python-Dev] iter alternate form and *args and **kwargs (Was: Wishlist: dowhile)

2005-06-15 Thread Steven Bethard
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