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/110730.html below:

[Python-Dev] python and super

[Python-Dev] python and super [Python-Dev] python and superMichael Foord fuzzyman at voidspace.org.uk
Fri Apr 15 15:30:11 CEST 2011
On 15/04/2011 02:02, Greg Ewing wrote:
> Michael Foord wrote:
>> What I was suggesting is that a method not calling super shouldn't 
>> stop a *sibling* method being called, but could still prevent the 
>> *parent* method being called.
>
> There isn't necessarily a clear distinction between parents
> and siblings.
>
> class A:
>   ...
>
> class B(A):
>   ...
>
> class C(A, B):
>   ...
>
> In C, is A a parent of B or a sibling of B?
>
For a super call in C, B is a sibling to A. For a super call in B, A is 
a parent.

With the semantics I was suggesting if C calls super, but A doesn't then 
B would still get called.

All the best,

Michael

-- 
http://www.voidspace.org.uk/

May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html

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