Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6886
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Duncan Booth <duncan.booth@invalid.invalid> |
| Newsgroups | comp.lang.python |
| Subject | Re: Updated blog post on how to use super() |
| Date | 2 Jun 2011 20:58:27 GMT |
| Lines | 21 |
| Message-ID | <Xns9EF8DF97BC311duncanbooth@127.0.0.1> (permalink) |
| References | <80476fba-1b57-4bb1-9d7d-391edaf3042d@22g2000prx.googlegroups.com> <is5dbe$n76$1@speranza.aioe.org> |
| Reply-To | duncan.booth@suttoncourtenay.org.uk |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=iso-8859-1 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | individual.net eO5JuwzZ9/ARNlpKaaaSfgoel30m623AzXXA+hSbnBJjByXgX5 |
| Cancel-Lock | sha1:VjRpRhnvI3Ksj6kClWrqlCji5yo= |
| User-Agent | Xnews/2006.08.24 Hamster/2.1.0.11 |
| X-Face | .C;/v3#w@2k.C(.1v-}d=`|7AQ-%,#A$0ZGtAkLPvuawAM>3#D,pXaAb31%(=Gn2ZZK/Z~fd0y4't5iKK~F":}F2*|\mQYX+BUr4ZM*|+`@o-TKzFGwsJnan{)*b~QJ-Fu^u'$$nYV |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:6886 |
Show key headers only | View raw
Billy Mays <noway@nohow.com> wrote: > I read this when it was on HN the other day, but I still don't see what > is special about super(). It seems (from your post) to just be a stand > in for the super class name? Is there something special I missed? > Consider any diamond hierarchy: class Base(object): pass class A(Base): pass class B(Base): pass class C(A, B): pass If you have an instance of C, then in a method in A super() could refer to a method in B which is not a base class of A. If you have an instance of A then the sampe super() reference in one of A's methods refers to the method in Base. -- Duncan Booth http://kupuguy.blogspot.com
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Updated blog post on how to use super() Raymond Hettinger <python@rcn.com> - 2011-05-31 19:44 -0700
Re: Updated blog post on how to use super() Ben Finney <ben+python@benfinney.id.au> - 2011-06-01 14:26 +1000
Re: Updated blog post on how to use super() Billy Mays <noway@nohow.com> - 2011-06-01 09:03 -0400
Re: Updated blog post on how to use super() Ian Kelly <ian.g.kelly@gmail.com> - 2011-06-01 10:42 -0600
Re: Updated blog post on how to use super() Billy Mays <noway@nohow.com> - 2011-06-01 12:46 -0400
Re: Updated blog post on how to use super() Ian Kelly <ian.g.kelly@gmail.com> - 2011-06-01 11:06 -0600
Re: Updated blog post on how to use super() Chris Torek <nospam@torek.net> - 2011-06-01 17:43 +0000
Re: Updated blog post on how to use super() Duncan Booth <duncan.booth@invalid.invalid> - 2011-06-02 20:58 +0000
csiph-web