How do you control _all_ items added to a list?

Nick Coghlan ncoghlan at iinet.net.au
Tue Mar 1 05:31:38 EST 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.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at email.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.skystorm.net



More information about the Python-list mailing list