[Python-Dev] Small misleadingness in docs (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Sat Feb 14 03:07:25 CET 2009
- Previous message: [Python-Dev] Small misleadingness in docs
- Next message: [Python-Dev] Small misleadingness in docs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Raymond Hettinger wrote:
This smells like a bug that brings issubclass() out of sync with isinstance().
No, it affects both isinstance() and issubclass(). They both raise a TypeError if the purported class object doesn't have a bases attribute that is a tuple.
This isn't necessarily wrong, but perhaps the docs could be re-worded slightly to make this clearer.
Another thing is that this whole paragraph only appears in the Python/C API reference, not in the docs for the Python isinstance and issubclass functions, where the docs imply that only genuine class or type objects are accepted.
And nowhere does it mention that bases must be a tuple.
-- Greg
- Previous message: [Python-Dev] Small misleadingness in docs
- Next message: [Python-Dev] Small misleadingness in docs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]