Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #34748
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes |
| Date | 2012-12-12 20:36 -0500 |
| References | <201212102248.50766.dave@cinege.com> <201212121420.20184.dave@cinege.com> <CALwzidnsEhQivtY9aNrmr4On74CG4ChAapy-8qupBUM=txdMrQ@mail.gmail.com> <mailman.804.1355350861.29569.python-list@python.org> <50c921ae$0$29972$c3e8da3$5496439d@news.astraweb.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.816.1355362647.29569.python-list@python.org> (permalink) |
On 12/12/2012 7:30 PM, Steven D'Aprano wrote: > On Wed, 12 Dec 2012 17:20:53 -0500, Dave Cinege wrote: > >> Isn't super() depreciated? > > Heavens no. super() is the recommended way to do inheritance, and the > *only* way to correctly do multiple inheritance[1]. Indeed. Rather than super() being deprecated, it was made easier to use in 3.x by being special cased during compilation. Notice the difference of signatures: 2.7: super(type[, object-or-type]) 3.3: super([type[, object-or-type]]) "The zero argument form only works inside a class definition, as the compiler fills in the necessary details to correctly retrieve the class being defined, as well as accessing the current instance for ordinary methods." > [1] Well, technically there's another way: one might reimplement the > functionality of super() in your own code, and avoid using super() while > having all the usual joys of reinventing the wheel. This deeper integration means that it could not be completely reimplemented in Python ;-). -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes Dave Cinege <dave@cinege.com> - 2012-12-12 17:20 -0500
Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-12-13 00:30 +0000
Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes Chris Angelico <rosuav@gmail.com> - 2012-12-13 12:14 +1100
Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes Dave Cinege <dave@cinege.com> - 2012-12-12 20:30 -0500
Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes Terry Reedy <tjreedy@udel.edu> - 2012-12-12 20:36 -0500
ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes - v20121212 Dave Cinege <dave@cinege.com> - 2012-12-12 20:42 -0500
csiph-web