On 04/07/2013 12:55, Ronald Oussoren wrote:
You can find the fully qualified name of the method with the qualname attribute:
class A:
... def method(self): pass
...
A.method.__qualname__
'A.method'
That doesn't seem helpful as a sensible way to get back to the class object:
>> globals()[MyClass.method.__qualname__.split('.')[0]]
<class '__main__.MyClass'>
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com