In python it's possible to use '.' in order to access object's dictionary items. For example:
class test( object ) :
def __init__( self ) :
self.b = 1
def foo( self ) :
obj = test()
a = obj.foo
You can use the
__self__ property of a bound method to access the instance that the method is bound to.
>> a.__self__ <__main__.test object at 0x782d0> >> a.__self__.b = 2 >> obj.b 2
You can also use the
im_self property, but this is not forward compatible with Python 3.
>> a.im_self <__main__.test object at 0x782d0>