Calling a class method

Andreas Waldenburger usenot at geekmail.INVALID
Sat Apr 17 09:44:56 EDT 2010

On Sat, 17 Apr 2010 06:09:21 -0700 (PDT) vsoler
<vicente.soler at> wrote:

> I got the following error:
> TypeError: unbound method duplica() must be called with TTT instance
> as first argument (got int instance instead)
> What am I doing wrong?

Not reading the error message.

You need to create a TTT instance and call your method from that:

inst = TTT()

I notice you ask a lot of very basic beginner questions. While there
is nothing wrong with being a beginner and asking questions, I think you
should read more introductory material and tutorials. Concerning
classes, pick one of the following that you like:
(Yes I am teasing you a bit ;) )

Also, maybe you'd like to post to the tutor list[1], which is (to my
understanding) intended for just this kind of question.




More information about the Python-list mailing list