[Python-3000] Drop list.reverse()?

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Feb 15 03:16:14 CET 2008


Raymond Hettinger wrote:
> When you run reversed(s), the s argument
> can be any Sequence (either mutable or immutable) and the
> return value is an iterator that doesn't copy the whole
> dataset.

If reversed() became a *view* (a mutable one) rather than
an iterator, there might be more of a case for dropping
list.reverse(), although I'm still not sure.

It might still be a good idea to make reversed() a view
(maybe mutable, maybe not).

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | Carpe post meridiem!          	  |
Christchurch, New Zealand	   | (I'm not a morning person.)          |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+


More information about the Python-3000 mailing list