By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,957 Members | 1,969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,957 IT Pros & Developers. It's quick & easy.

How to get the class instance of a passed method ?

P: n/a
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
Nov 20 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.