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

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

[Python-Dev] Single- vs. Multi-pass iterability [Python-Dev] Single- vs. Multi-pass iterabilityKevin Jacobs jacobs@penguin.theopalgroup.com
Mon, 8 Jul 2002 14:30:33 -0400 (EDT)
On Mon, 8 Jul 2002, David Abrahams wrote:
> I keep running into the problem that there is no reliable way to introspect
> about whether a type supports multi-pass iterability (in the sense that an
> input stream might support only a single pass, but a list supports multiple
> passes). I suppose you could check for __getitem__, but that wouldn't cover
> linked lists, for example.
> 
> Can anyone channel Guido's intent for me? Is this an oversight or a
> deliberate design decision? Is there an interface for checking
> multi-pass-ability that I've missed?

As far as I can tell, there is no published Python mechanism that
distinguishes "input iterators" from "forward iterators" (using the C++
parlance).

-Kevin


--
Kevin Jacobs
The OPAL Group - Enterprise Systems Architect
Voice: (216) 986-0710 x 19         E-mail: jacobs@theopalgroup.com
Fax:   (216) 986-0714              WWW:    http://www.theopalgroup.com





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