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/026834.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
Fri, 19 Jul 2002 20:41:18 -0400
> Would it be good to use __next__() if it exists, else try next()?

Then the code in typeobject.c (e.g. resolve_slotdups) would have to
map tp_iternext to *both* __next__ and next.

> This doesn't fix the current 'wart,' however, it could allow
> moving closer to the desired end.  It could cause confusion.
> For compatability, one would only need to do:
> 
> 	next = __next__
> 
> or vica versa.
> 
> Not sure this is worth it.  But if there is a transition, it could
> ease the pain.

I don't think it's worth it.

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