A RetroSearch Logo

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

Search Query:

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

[Python-Dev] Wishlist: dowhile

[Python-Dev] Wishlist: dowhile [Python-Dev] Wishlist: dowhileBob Ippolito bob at redivi.com
Tue Jun 14 14:41:14 CEST 2005
On Jun 14, 2005, at 2:25 AM, Raymond Hettinger wrote:

>> def readby(inp, blocksize=1024):
>>      while True:
>>          data = inp.read(blocksize)
>>          if not data:
>>              break
>>          yield data
>>
>> for data in readby(inp, blocksize):
>>      . . .
>>
>
> readby() relies on the existence of a read() method for inp.
> itertools work with generic iterators, not ones with a specific API.
> Law of Demeter.

islice depends on __getitem__.

-bob

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