Path: csiph.com!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.ag!news2.euro.net!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.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'argument': 0.05; 'class,': 0.07; 'here?': 0.09; 'wrong,': 0.09; 'python': 0.11; 'def': 0.12; 'wrote': 0.14; 'useful,': 0.14; '10:49': 0.16; '23,': 0.16; 'inaccurate': 0.16; 'mro': 0.16; 'roy': 0.16; 'subject:object': 0.16; 'wrote:': 0.18; 'looks': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'class': 0.32; 'skip:_ 10': 0.34; 'subject:the': 0.34; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'next': 0.36; 'whatever': 0.38; 'to:addr:python- list': 0.38; 'rather': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'ian': 0.60; 'is.': 0.60; 'simply': 0.61; "you're": 0.61; 'first': 0.61; 'smith': 0.68; 'as:': 0.81; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=8aMcy3azcjIiz2XPuQ4UCegvVxzWq8hMg0Hdc/Wn14o=; b=VAdxUGjLAFixL56lL7H574n8aeMyZb2L7PKb0rKEIpgfwgLpwxqy8nlSU1Gu2mGXtr piKML7OnWT/tyLSwc5CtdEtSO1P8xFrlgLt4HN1InpHzPmF1Wu4xpY9Ayb5j8MGjSPv2 yZ+WIol0UBRsLXJ3OvLkFyqmwJKFcj1xnwYUp1GSdiFeY1NR45Dj1gyc/OAQ/peIzTki 7CYW08rzWCdBmWhng9D8a0J7wOARBRSmYhpwId6f8FfEArs1pSrtjwuZ0syRy2EXdJP/ 7Nm1EfhR5aXH8Cbo5zyYtTy88JqfBd4nN/Abx4hFJEMvpDIQM4om7snO0IROWXVrbgxR IbWQ== X-Received: by 10.66.8.69 with SMTP id p5mr550857paa.57.1372007964093; Sun, 23 Jun 2013 10:19:24 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: 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> From: Ian Kelly Date: Sun, 23 Jun 2013 11:18:41 -0600 Subject: Re: What is the semantics meaning of 'object'? To: Python Content-Type: text/plain; charset=ISO-8859-1 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372007973 news.xs4all.nl 15997 [2001:888:2000:d::a6]:56209 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48993 On Sun, Jun 23, 2013 at 11:08 AM, Ian Kelly wrote: > On Sun, Jun 23, 2013 at 10:49 AM, Roy Smith wrote: >> am I missing something here? > > Yes, you're missing that super() does not simply call the base class, > but rather the next class in the MRO for whatever the type of the > "self" argument is. If you write the above as: 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. There might still be some code I wrote out there from when I first started using Python that looks something like: def __init__(self): super(Base, self).__init__() Mixin.__init__(self) Which is simply wrong, wrong, wrong.