How do you control _all_ items added to a list?

Nick Coghlan ncoghlan at
Tue Mar 1 11:31:38 CET 2005

Xif wrote:
> Overiding all those methods is too much of an effort. I don't really
> need them.

Hmm, it might be nice if there was a UserList.ListMixin that was the counterpart 
to UserDict.DictMixin that let's you provide the full dictionary API with just 
__getitem__, __setitem__, __delitem__ and keys()

With an appropriate ListMixin, providing the first three methods would suffice 
to support the full list API.


Nick Coghlan   |   ncoghlan at   |   Brisbane, Australia

More information about the Python-list mailing list