Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'example:': 0.03; 'programmer': 0.03; 'badly': 0.09; 'calls.': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'name?': 0.09; 'oop': 0.09; 'received:184.172': 0.09; 'received:gator410.hostgator.com': 0.09; '~ethan~': 0.09; 'python': 0.11; 'def': 0.12; 'mostly': 0.14; 'useful,': 0.14; '**kwargs):': 0.16; '23,': 0.16; 'foo,': 0.16; 'inaccurate': 0.16; 'lookups': 0.16; "object's": 0.16; 'prohibit': 0.16; 'subject:object': 0.16; 'language': 0.16; 'wrote:': 0.18; 'help.': 0.21; '>>>': 0.22; 'saying': 0.22; 'header:User-Agent:1': 0.23; 'developers': 0.25; 'post': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'feature': 0.29; 'am,': 0.29; "doesn't": 0.30; "i'm": 0.30; '>>>>': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'class': 0.32; 'languages': 0.32; 'trouble': 0.34; 'skip:_ 10': 0.34; 'subject:the': 0.34; 'could': 0.34; 'created': 0.35; 'late': 0.35; 'but': 0.35; 'there': 0.35; 'surely': 0.36; 'charset:us- ascii': 0.36; 'too': 0.37; 'somebody': 0.38; 'to:addr:python- list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'skip:u 10': 0.60; 'ian': 0.60; 'most': 0.60; 'received:173': 0.61; 'simply': 0.61; 'back': 0.62; 'advanced': 0.63; 'name': 0.63; 'received:69.56': 0.68; 'therefore': 0.72; 'around,': 0.84; 'completely,': 0.84; 'expose': 0.84; 'instantly': 0.84; 'inheritance,': 0.93; 'relating': 0.93; '2013': 0.98 Date: Wed, 26 Jun 2013 13:14:44 -0700 From: Ethan Furman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: python-list@python.org Subject: Re: What is the semantics meaning of 'object'? References: <15ba0011-bbf1-42f7-b3ea-1c1d4b70e56b@googlegroups.com> <51c66962$0$29999$c3e8da3$5496439d@news.astraweb.com> <20130623133546.GA2308@capricorn> <51c723b4$0$29999$c3e8da3$5496439d@news.astraweb.com> <51c73229$0$29999$c3e8da3$5496439d@news.astraweb.com> <51c74373$0$29999$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: <51c74373$0$29999$c3e8da3$5496439d@news.astraweb.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([173.12.184.233]) [173.12.184.233]:33857 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 2 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 50 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372279084 news.xs4all.nl 15876 [2001:888:2000:d::a6]:39532 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49277 On 06/23/2013 11:50 AM, Steven D'Aprano wrote: > On Sun, 23 Jun 2013 12:04:35 -0600, Ian Kelly wrote: > >> On Sun, Jun 23, 2013 at 11:36 AM, Steven D'Aprano >> wrote: >>> On Sun, 23 Jun 2013 11:18:41 -0600, Ian Kelly wrote: >>> >>>> Incidentally, although super() is useful, it's not perfect, and this >>>> is one of my grievances with it: that a user can, based upon the name, >>>> draw an inaccurate assumption about what it does without reading or >>>> fully understanding the documentation on it, which might then result >>>> in misusing it. >>> >>> Wait a second... are you saying that the Python developers created an >>> advanced language feature relating to multiple inheritance, one of the >>> most complex OOP concepts around, so difficult that most other >>> languages simply prohibit it completely, and it wasn't instantly and >>> correctly intuited by every single programmer based only on the name? >>> Oh my stars, somebody call Ranting Rick, he needs to write a PyWart >>> post to expose this scandal!!! >> >> Mostly I'm saying that super() is badly named. > > > What else would you call a function that does lookups on the current > object's superclasses? Well, I would call it super(). Trouble is, that is not all that super() does. Going back to Ian's example: > On 06/23/2013 10:08 AM, Ian Kelly wrote: >> >> class Base1(object): >> def __init__(self, foo, **kwargs): >> super(Base1, self).__init__(**kwargs) >> >> class Base2(object): >> def __init__(self, bar, **kwargs): >> super(Base2, self).__init__(**kwargs) >> >> class Derived(Base1, Base2): >> def __init__(self, **kwargs): >> super(Derived, self).__init__(**kwargs) Notice how Base1 calls super(), but depending on circumstances, it could by Base2 that super() calls. Surely you are not suggesting that Base2 is therefore an ancestor of Base1? It's too late to change the name now, but pretending there is no good and valid reason for confusion doesn't help. -- ~Ethan~