Re: How do you control _all_ items added to a list?
From: Nick Coghlan (ncoghlan_at_iinet.net.au)
Date: 03/01/05
- Next message: Steve Holden: "Re: accessor/mutator functions"
- Previous message: Nick Craig-Wood: "Re: accessor/mutator functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 01 Mar 2005 20:31:38 +1000 To: Python List <python-list@python.org>
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@email.com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
- Next message: Steve Holden: "Re: accessor/mutator functions"
- Previous message: Nick Craig-Wood: "Re: accessor/mutator functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]