Overriding UserList methods

Daniel Klein danielk at aracnet.com
Mon Mar 5 01:35:27 EST 2001


I found the answer in the Beazley book. It's

def append(self, object):
        self.data.append(object)

using the 'data' instance variable automatically set up in the UserList class.

But I'll try the other suggestions anyway just to get a better understanding.

Thanks,
Dan



More information about the Python-list mailing list