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/026724.html below:

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

[Python-Dev] Single- vs. Multi-pass iterability [Python-Dev] Single- vs. Multi-pass iterabilityGuido van Rossum guido@python.org
Thu, 18 Jul 2002 15:18:38 -0400
> > I've just had a thought. Maybe it would be less of a mess
> > if what we are calling "iterators" had been called "streams"
> 
> Possibly -- I did use the "streams" name often in the tutorial
> on iterators and generators, it's a very natural term.

OTOH in C++ and Java, "stream" refers to an open file object (to
emphasize the iteratorish feeling of a file opened for sequential
reading or writing, as opposed to the concept of a file as a
random-access array of bytes on disk).

> Seekable files can be multi-pass, but in the strict sense
> that you can rewind them -- it's still impractical to have
> them produce multiple *independent* iterators (needing
> some sort of in-memory caching).

It would be trivial if you had an object representing the notion of a
file on disk rather than an open file.  Each iterator would be
implemented as a separate open file referring to the same filename.

--Guido van Rossum (home page: http://www.python.org/~guido/)




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