I'd like to sublcass the built-in list type to create my own container. How can I make slices of the list be of type myclass-- currently they are lists. Example:
>>> class MyFoo(list):
def __init__(self, inlist):
self = inlist[:]
>>> me = MyFoo(range(10))
>>> type(me)
<class '__main__.MyFoo'>
>>> type(me[0:3])
<type 'list'>
All help appreciated!
Thanks,
Marcus
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor