I'm trying to inherit from collections.MutableSequence:
class myList(MutableSequence):
def __new__(cls,*kwargs):
obj=MutableSequence.__new__(cls,*kwargs)
return obj
I get the error:
>>>a=myList()
>>>TypeError: Can't instantiate abstract class ContactMapList with abstract methods __delitem__, __getitem__, __len__, __setitem__, insert
I did not get any errors when I was deriving my class directly from the built-in list class in the same fashion:
class myList(list):
def __new__(cls,*kwargs):
obj=list.__new__(cls,*kwargs)
return obj
I've tried to search for ways to define a constructor for myList(MutableSequence) but with not luck :(