My own list object
MDK
mdk at mdk.com
Tue Feb 5 11:29:14 EST 2002
"Emile van Sebille" <emile at fenx.com> wrote in message
news:a3p0ss$19ob7s$1 at ID-11957.news.dfncis.de...
>
> "MDK" <mdk at mdk.com> wrote in message
> news:a3p01b$186eq8$1 at ID-98166.news.dfncis.de...
> > 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.
> >
>
> Call the method append and not __append__?
>
>
> --
>
> Emile van Sebille
> emile at fenx.com
Yes, I figured that to be the case because it should be transparant to the
caller. However, that is not the solution.
Thanks though.
More information about the Python-list
mailing list