[Python-Dev] Problem with super() usage

Willem Broekema metawilm at gmail.com
Tue Jul 18 18:22:11 CEST 2006


On 7/18/06, glyph at divmod.com <glyph at divmod.com> wrote:
> C++ originally specified multiple inheritance, but it wasn't "cooperative" in
> the sense that super is.  In Lisp, though, where cooperative method dispatch
> originated, call-next-method does basically the same thing in the case where
> there's no next method: it calls "no-next-method" which signals a generic
> error.

Don't forget Lisp's "next-method-p", which tests ("-p" for
"predicate") if there is any next method to call. Highly elegant, I'd
say.

> http://www.lisp.org/HyperSpec/Body/locfun_call-next-method.html

http://www.lisp.org/HyperSpec/Body/locfun_next-method-p.html

- Willem


More information about the Python-Dev mailing list