My own list object

MDK mdk at mdk.com
Tue Feb 5 11:08:10 EST 2002


Hello,

I am trying to create my own special type of list object.

However, when I do x.append('yo') it uses Python's append instead of the one
from my class.

How can I get it to use my append method?  I have tried def __append__ and
then called my own class' function but that did not work.  I've played with
__getattr__ but that did not help.

If this is not easy can someone at least point me to an example of what I
want to do?

Thank you.





More information about the Python-list mailing list