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/2009-February/086081.html below:

[Python-Dev] Small misleadingness in docs

[Python-Dev] Small misleadingness in docs [Python-Dev] Small misleadingness in docsGreg Ewing greg.ewing at canterbury.ac.nz
Sat Feb 14 02:27:29 CET 2009
I've discovered something slightly misleading in the docs
for PyObject_IsInstance:

   When testing if B is a subclass of A, if A is B, PyObject_IsSubclass
   returns true. If A and B are different objects, B‘s __bases__
   attribute is searched...

This suggests that issubclass(A, A) will always be true,
regardless of what attributes A has. However, this turns
out not to be so -- A must also have a __bases__ attribute,
otherwise it's rejected as not being sufficiently class-like.

-- 
Greg

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