This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Inheritance behaviour ambiguos
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, xiang.zhang, yugansh94
Priority: normal Keywords:

Created on 2017-01-04 05:14 by yugansh94, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
oops.py yugansh94, 2017-01-04 05:14 pyhton file
Messages (3)
msg284610 - (view) Author: Yugansh Marwah (yugansh94) Date: 2017-01-04 05:14
Inheritance property behaves ambiguously on inheriting multiple inheritance over a class
It even calls the function of un-inherited class
code is attached below kindly run it and tell me the exact behavior of the same.
msg284611 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2017-01-04 05:43
It seems you are surprised `super(C, self).foo2()` works but it is actually how super() and class.__mro__ works. :-) So not a bug. You could learn more about it but sorry I don't have any good reference for you. :-(
msg284682 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-01-05 01:06
You may find Raymond Hettinger's "super() considered super" article helpful to understand how Python's super() works: https://rhettinger.wordpress.com/2011/05/26/super-considered-super/
History
Date User Action Args
2022-04-11 14:58:41adminsetgithub: 73334
2017-01-05 01:06:31berker.peksagsetnosy: + berker.peksag
messages: + msg284682
2017-01-04 05:43:10xiang.zhangsetstatus: open -> closed

nosy: + xiang.zhang
messages: + msg284611

resolution: not a bug
stage: resolved
2017-01-04 05:14:47yugansh94create