<div class="gmail_quote">On Wed, May 25, 2011 at 12:31 PM, Ian Kelly <span dir="ltr"><<a href="mailto:ian.g.kelly@gmail.com">ian.g.kelly@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Wed, May 25, 2011 at 11:54 AM, Jess Austin <<a href="mailto:jess.austin@gmail.com">jess.austin@gmail.com</a>> wrote:<br>
> So I guess that when super() is called in the context of a class def<br>
> rather than that of a method def, it doesn't have the information it<br>
> needs. Now I'll probably just say:<br>
><br>
>    do_GET = do_decorate(CGIHTTPRequestHandler.do_GET)<br>
><br>
> but I wonder if there is a "correct" way to do this instead? Thanks!<br>
<br>
</div>I would recommend against using super() in general.<br>
<br></blockquote><div><br></div><div>That position is understandable.  However, super is fine for single inheritance, and works fine in cooperative multiple inheritance.  You can just as easily argue that multiple inheritance is more harmful than super is.  If fact, I would generally recommend against using multiple inheritance if you can avoid it (though it has its place).</div>
<div><br></div><div>Personally, I find super to make maintenance and refactoring easier, since I don't have to fiddle with the base class name, or with passing self.</div><div><br></div><div>Cheers,</div><div><br></div>
<div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<a href="http://fuhm.net/super-harmful/" target="_blank">http://fuhm.net/super-harmful/</a><br>
<br>
Cheers,<br>
<font color="#888888">Ian<br>
</font><div><div></div><div class="h5">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>