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
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 (
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 (
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 ()
Christian Heimes wrote:
thanks Christian,
cheers,
Stef
--
http://mail.python.org/mailman/listinfo/python-list
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
--
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