How to get the class instance of a passed method ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stef Mientki

    How to get the class instance of a passed method ?

    hello,

    if I pass a class method to a function,
    is it possible to determine the class instance in that function ?

    class test ( object ) :
    def My_Method ( self ) :
    return 22

    def do_something ( parameter ) :
    # here I want to determine My_Instance

    My_Instance = test ()
    do something ( My_Instance.My_ Method )


    thanks
    Stef Mientki
Working...