A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-July/127177.html below:

[Python-Dev] lament for the demise of unbound methods

[Python-Dev] lament for the demise of unbound methods [Python-Dev] lament for the demise of unbound methodsChris Withers chris at simplistix.co.uk
Thu Jul 4 14:16:12 CEST 2013
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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4