A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-June/054200.html below:

[Python-Dev] Wishlist: dowhile

[Python-Dev] Wishlist: dowhile [Python-Dev] Wishlist: dowhileRaymond Hettinger python at rcn.com
Mon Jun 13 22:46:18 CEST 2005
[Jp Calderone]
> Anything can be a for loop.
> 
>   for chunk in iter(lambda: f1.read(CHUNK_SIZE), ''):
>       f2.write(chunk)

It would be nice to have this encapsulated in a file method:

    for chunk in f1.iterblocks(CHUNK_SIZE):
        f2.write(chunk)


Raymond
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4