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/2002-July/026531.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
Mon, 15 Jul 2002 10:15:28 -0400
> I think it's more complicated than that. If the file
> object were to become an object obeying the iterator
> protocol, its next() method should really return the
> next *byte* of the file. Then you'd still want methods
> like read(), readline() etc. for reading in larger
> chunks.

I don't think so.  We should pick the most convenient chunking for the
default iterator, and provide explicit ways to ask for other iterators
(like dict iterators).  Also, since "for line in file" already works,
there's a strong precedent for iterating by line by default.

--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