[New-bugs-announce] [issue27158] `isnstance` builtin does not handle types that are their own type
ppperry
report at bugs.python.org
Sun May 29 18:52:41 EDT 2016
New submission from ppperry:
If one executes the following statements:
>>> class metatype(type):pass
>>> class x(type,metaclass=metatype):pass
>>> x.__class__ = x
, one gets a type that is it's own type: (`type(x) is x`). However, `isinstance(x,x)` unexpectedly returns False. How is my `x` type not an instance of itself.
----------
components: Interpreter Core
messages: 266644
nosy: ppperry
priority: normal
severity: normal
status: open
title: `isnstance` builtin does not handle types that are their own type
versions: Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27158>
_______________________________________
More information about the New-bugs-announce
mailing list