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

[Python-Dev] PEP 322: Reverse Iteration

[Python-Dev] PEP 322: Reverse Iteration [Python-Dev] PEP 322: Reverse IterationMoore, Paul Paul.Moore at atosorigin.com
Tue Nov 4 09:41:11 EST 2003
From: Guido van Rossum [mailto:guido at python.org]
> Such a thing would face zero opposition if it was part of itertools:
> itertools.revrange([start, ] stop[, step]) makes total sense to me...

I also like Alex's suggestion of
    itertools.irange([start,] stop[, step][,reverse=False])

I'd rather this than a revrange - that feels over-specialised, whereas
an irange with a reverse keyword parameter seems natural.

I'd still support this addition to itertools whether or not the reversed()
builtin was implemented (although with irange, reversed() loses a lot of
its use cases...)

Paul.

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