Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6257
| References | <aed43cea-eae7-40d5-a3c9-13b841d3fd7c@c41g2000yqm.googlegroups.com> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2011-05-25 12:31 -0600 |
| Subject | Re: super() in class defs? |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2087.1306348325.9059.python-list@python.org> (permalink) |
On Wed, May 25, 2011 at 11:54 AM, Jess Austin <jess.austin@gmail.com> wrote: > So I guess that when super() is called in the context of a class def > rather than that of a method def, it doesn't have the information it > needs. Now I'll probably just say: > > do_GET = do_decorate(CGIHTTPRequestHandler.do_GET) > > but I wonder if there is a "correct" way to do this instead? Thanks! I would recommend against using super() in general. http://fuhm.net/super-harmful/ Cheers, Ian
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
super() in class defs? Jess Austin <jess.austin@gmail.com> - 2011-05-25 10:54 -0700
Re: super() in class defs? Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-25 12:31 -0600
Re: super() in class defs? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-25 21:40 +0000
Re: super() in class defs? Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-25 17:31 -0600
Re: super() in class defs? Raymond Hettinger <python@rcn.com> - 2011-05-25 16:45 -0700
csiph-web