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/2003-November/040017.html below:

[Python-Dev] Re: PEP 322: Reverse Iteration

[Python-Dev] Re: PEP 322: Reverse Iteration [Python-Dev] Re: PEP 322: Reverse IterationGuido van Rossum guido at python.org
Wed Nov 5 13:33:56 EST 2003
> So: let's keep it simple and have reversed
> be _exactly_ equivalent to (net of performance, hypothetical anomalous 
> "pseudosequences" doing weird things, & exact error kinds/msgs):
> 
> def reversed(sequence):
>     for x in xrange(len(sequence)-1, -1, -1): yield sequence[x]
> 
> no __reversed__, no complications, "no nuttin'".
> 
> Putting that in the current 2.4 pre-alpha will let us start getting some
> experience with it and see if in the future we want to add refinements
> (always easier to add than to remove...:-) -- either to reverse or to
> other iterator-returning calls (e.g. reverse= optional arguments just
> like in the sort method of lists).

I'd be for that, *if* we also allow as a possible outcome that
reversed() simply doesn't find any use and we take it out before
releasing 2.4b1.

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

More information about the Python-Dev mailing list

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