[Python-Dev] Problem with super() usage (original) (raw)
Willem Broekema metawilm at gmail.com
Tue Jul 18 18:22:11 CEST 2006
- Previous message: [Python-Dev] Problem with super() usage
- Next message: [Python-Dev] Problem with super() usage
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/locfuncall-next-method.html
http://www.lisp.org/HyperSpec/Body/locfun_next-method-p.html
- Willem
- Previous message: [Python-Dev] Problem with super() usage
- Next message: [Python-Dev] Problem with super() usage
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]