Re: How to get the class instance of a passed method ?

2008-11-25 Thread Bruno Desthuilliers
Arnaud Delobelle a écrit : (snip) .im_self will become example.method.__self__ and in python 3. But I can't see the equivalen of .im_class? At worst, you'll still have example.method.__self__.__class__ !-) -- http://mail.python.org/mailman/listinfo/python-list

How to get the class instance of a passed method ?

2008-11-20 Thread Stef Mientki
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 (

How to get the class instance of a passed method ?

2008-11-20 Thread Stef Mientki
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 (

Re: How to get the class instance of a passed method ?

2008-11-20 Thread Christian Heimes
Stef Mientki wrote: 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 ()

Re: How to get the class instance of a passed method ?

2008-11-20 Thread Stef Mientki
Christian Heimes wrote: thanks Christian, cheers, Stef -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get the class instance of a passed method ?

2008-11-20 Thread Rafe
On Nov 21, 6:41 am, Stef Mientki [EMAIL PROTECTED] wrote: Christian Heimes wrote: thanks Christian, cheers, Stef OT: Just to pass along some great advice I got recently. Read PEP008. It contains guidelines for formatting your code. - Rafe --

Re: How to get the class instance of a passed method ?

2008-11-20 Thread Arnaud Delobelle
Christian Heimes [EMAIL PROTECTED] writes: Stef Mientki wrote: 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