[New-bugs-announce] [issue18275] Make isinstance() work with super type instances
Brett Cannon
report at bugs.python.org
Fri Jun 21 03:33:23 CEST 2013
New submission from Brett Cannon:
class A: pass
class B(A): pass
sup = super(B, B())
isinstance(sup, A) # returns False
Why is that? Is there an explicit reason to prevent that isinstance check from working? How about just for ABCs? Either way it's annoying that at least for ABCs you can't check against a super object.
----------
components: Interpreter Core
messages: 191550
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: Make isinstance() work with super type instances
type: behavior
versions: Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18275>
_______________________________________
More information about the New-bugs-announce
mailing list