Janne Härkönen wrote:

>>>> class X:
> ...   def x(self):
> ...    pass
> ...
>>>> class Y(X):
> ...   def y(self):
> ...    pass
> ...
>>>> y = Y()
>>>> y.x.im_class
> <class __main__.Y at 0x7ff24bfc>
>>>> y.y.im_class
> <class __main__.Y at 0x7ff24bfc>
> 
> What I would like to find out is the declaring class of method x,
> ie. class X How to do this ?

The general idea of OOP is to not have to do this. I suspect you
have a problematic design. What's the problem you try to solve?

Regards,


Björn

-- 
BOFH excuse #105:

UPS interrupted the server's power

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to