How to pass class instance to a method?

Gregory Ewing greg.ewing at
Sun Nov 25 23:22:59 CET 2012

ALeX inSide wrote:
> I suppose there shall be some kind of method decorator to treat an argument as an 
 > instance of class?

You can do this:

    xxx = MyClass.some_method

and then

    i = MyClass()
    xxx(i, foo, bar)

Does that help?


More information about the Python-list mailing list