Style guide for subclassing built-in types?

Just just at xs4all.nl
Thu Feb 24 04:11:14 EST 2005


In article <1109208924.563510.212500 at f14g2000cwb.googlegroups.com>,
 janeaustine50 at hotmail.com wrote:

> Thank you but your advice doesn't fit in my case since I want to keep
> the memory usage and the initial time minimum. iterable[::-1] would
> build another list and it would take big memory and time during
> reversing if iterable were huge. (and the "iterable" wouldn't be
> garbage-collected because I want to keep a reference to it)

If your list contains numbers (or lists of numbers), consider using 
NumPy (Numeric) or Numarray, in which seq[::-1] will actually return a 
"view", and not a copy.

Just



More information about the Python-list mailing list