[Python-Dev] type.subclasses() doesn't work (original) (raw)
Hrvoje Niksic hrvoje.niksic at avl.com
Wed Oct 9 14:31:37 CEST 2013
- Previous message: [Python-Dev] type.__subclasses__() doesn't work
- Next message: [Python-Dev] cpython (3.3): Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at least
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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'>]
- Previous message: [Python-Dev] type.__subclasses__() doesn't work
- Next message: [Python-Dev] cpython (3.3): Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at least
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]