Comment on PEP-0322: Reverse Iteration Methods

Raymond Hettinger vze4rx4y at verizon.net
Thu Sep 25 14:38:20 EDT 2003


[sebastien]
> So, I'd expect to have a riter() function which would call the
> __riter__ special method.

Okay, changed pep to list riter() as an alternative.


> And I still think you don't need it often enough to put it in the
> builtin namespace, so the function should go in the itertools module.

If you have a magic method, __riter__, then the corresponding
function needs to be a builtin.  They go hand in hand.  The
core parts of the language need to be usable without having
to know about itertools.


Raymond






More information about the Python-list mailing list