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/2011-April/110691.html below:

[Python-Dev] python and super

[Python-Dev] python and superRonald Oussoren ronaldoussoren at mac.com
Thu Apr 14 16:18:22 CEST 2011
On 14 Apr, 2011, at 15:09, Ricardo Kirkner wrote:

> Hi all,
> 
> I recently stumbled upon an issue with a class in the mro chain not
> calling super, therefore breaking the chain (ie, further base classes
> along the chain didn't get called).
> I understand it is currently a requirement that all classes that are
> part of the mro chain behave and always call super. My question is,
> shouldn't/wouldn't it be better,
> if python took ownership of that part, and ensured all classes get
> called, even if some class misbehaved?

Not calling a method on super isn't  necessarily misbehavior.  It would be odd to not call super in __init__, but for other methods not calling the superclass implementation is fairly common.

Ronald

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