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/2002-July/026640.html below:

[Python-Dev] Single- vs. Multi-pass iterability

[Python-Dev] Single- vs. Multi-pass iterabilityAndrew Koenig ark@research.att.com
Wed, 17 Jul 2002 12:53:27 -0400 (EDT)
Gordon> OK, it's a pipe, and one iterator wants to go past
Gordon> what's been received. Is that iterator at EOF? Not
Gordon> really, just "temporary EOF". So should it block?
Gordon> But I'm single threaded and receiving asynchronously.
Gordon> Oh, and it turns out to be a humongous download,
Gordon> and what happens if the buffering mechanism runs
Gordon> out of memory / disk space. Does my process die?

Gordon> Aargh. Too much magic. Too many corner cases.

The implementation of the file should have a choice: Either refuse to
yield a multiple iterator (which seems to be your preference) or yield
one that works (which might or might not be my preference, depending
on circumstances).

In the latter case, I don't think your questions are hard to
answer, because most of the answers fall out of the single-iterator
case.  So if the iterator is at EOF, it should either block or
not, depending on what a single iterator should so.

The only real question is what happens if the buffering mechanism
runs out of space, but that's always a question for such mechanisms;
I don't see why it's any more irksome in this particular context.






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