Message387797
This is a bit out of date. The isinstance() docs now specify that the predicate tests for direct, indirect, and virtual inheritance. Likewise, the super() docs already specify that only the __mro__ is searched. So those docs are already precise.
Am thinking of adding a FAQ entry about when direct inheritance is required and include the OP's example. FWIW, this isn't really about super(). It affects any attribute lookup or any other property of inheritance. A true result from instance() doesn't imply that actual inheritance has occurred. |
|
Date |
User |
Action |
Args |
2021-02-28 00:10:50 | rhettinger | set | recipients:
+ rhettinger, docs@python, Gerrit.Holl, martin.panter, eryksun |
2021-02-28 00:10:50 | rhettinger | set | messageid: <1614471050.42.0.619402795142.issue20503@roundup.psfhosted.org> |
2021-02-28 00:10:50 | rhettinger | link | issue20503 messages |
2021-02-28 00:10:50 | rhettinger | create | |
|