Raymond Hettinger added the comment:

Sorry, Guido rejected this idea a long time ago.  We do have the __reversed__ 
hook so you can add reverse iteration to your own classes where it makes sense.

Doing it in the general case is more problematic.  Some data sources such as 
generators can't be run backwards so they would have to be run to exhaustion 
and saved in memory to support reversed iteration.  If a user wants this 
behavior, it is trivial to achieve it by running reversed(list(it)).  The user 
is in for unhappiness though if the underlying iterator is infinite or huge ;-)

----------
resolution:  -> rejected
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18826>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to