Offer the community a choice for a simpler, limited alternative.

This commit is contained in:
Raymond Hettinger 2003-10-28 20:40:56 +00:00
parent 9939002fc5
commit 6f412ebc5e
1 changed files with 10 additions and 0 deletions

View File

@ -153,6 +153,16 @@ library and comments on why reverse iteration was necessary:
underlying list is altered during iteration.
Active Alternative
==================
A simpler, but limited alternative is to create a builtin called
reverse_range() that takes the same arguments as range() but returns a
reverse iterator over the range. The idea is that much of the benefit
of inreverse() comes reducing the intellectual effort it takes to
express the arguments for [x]range() when going backwards.
Rejected Alternative
====================