[docs] [issue24515] docstring of isinstance

Terry J. Reedy report at bugs.python.org
Fri Jun 26 23:20:18 CEST 2015

Terry J. Reedy added the comment:

I agree that the tuple explanation if ok.  But "Return whether an object is an instance of a class or of a subclass thereof." (3.5) seems wrong.  I believe 'subclass' should be 'superclass'.
>>> class C: pass

>>> class Csub(C): pass

>>> isinstance(C(), Csub)
>>> isinstance(Csub(), C)

nosy: +terry.reedy
versions: +Python 3.4, Python 3.5, Python 3.6

Python tracker <report at bugs.python.org>

More information about the docs mailing list