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-October/129297.html below:

[Python-Dev] type.__subclasses__() doesn't work

[Python-Dev] type.__subclasses__() doesn't work [Python-Dev] type.__subclasses__() doesn't workHrvoje Niksic hrvoje.niksic at avl.com
Wed Oct 9 14:31:37 CEST 2013
On 10/09/2013 02:22 PM, Peter Otten wrote:
>> py> type.__subclasses__(type)
>> [<class 'abc.ABCMeta'>, <class 'string._TemplateMetaclass'>]
>
> The underlying problem seems to be that there is no helper function to
> bypass the instance attribute.

Note that the problem is specific to the "type" type, which is its own 
metatype. With other types that get __subclasses__ from type, is no 
problem with just calling __subclasses__():

 >>> int.__subclasses__()
[<type 'bool'>]

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