New submission from Patrick Monnerat <patr...@monnerat.net>:
Running the attached program outputs: -------- top.__init__(<__main__.top object at 0x7fc1dea24048>,) called i1.__init__(<__main__.top object at 0x7fc1dea24048>, 'arg from top') called i2.__init__(<__main__.top object at 0x7fc1dea24048>, 'arg from i1') called base.__init__(<__main__.top object at 0x7fc1dea24048>, 'arg from i2') called base.__init__ returns None i2.__init__ returns None i1.__init__ returns None top.__init__ returns None -------- i2.__init__() argument is wrong: since it is is not a parent class of i1, it should be "arg from top". I can understand i2.__init__() is called after i1.__init__() and before base.__init__() but arguments given to super(i1, self).__init__() should not be substituted for calling i2.__init__(). ---------- files: super.py messages: 352429 nosy: monnerat priority: normal severity: normal status: open title: super() is passing wrong parameters while handling diamond inheritance type: behavior Added file: https://bugs.python.org/file48608/super.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38171> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com