Subclassing list and splicing

Nobody nobody at nowhere.com
Fri Sep 4 17:35:37 EDT 2009


On Thu, 03 Sep 2009 17:10:12 +0000, Kreso wrote:

> I would prefer that resulting object m belonged to myclist class.
> How to obtain such behaviour? Must I somehow implement __getslice__
> method myself?

Yes; you should also implement __getitem__(), as this is used for extended
slices.




More information about the Python-list mailing list