On Mon, 4 Dec 2006, Ben Wing wrote:

> as a result, i imagine there's a strong urge to just hardcode the name 
> of the parent
     ^^^^^^^^^^

> -- super.meth(args) calls the superclass method `meth'
                            ^^^^^^^^^^^^^^

Python supports multiple inheritance, unlike Java; the design mantra is 
"explicit is better than implicit" and "ambiguity should be an error". 
Two! The two design mantras are...

> -- as an alternative or in addition, super(args) would work like 
> super.meth(args) if we're currently inside of `meth' in a subclass.  i 
> suspect that 90% of the time or more, `super' is used to chain to the 
> superclass version of an overridden method, and this optimizes for the 
> common case.

Commonly you know what the method is called at the point where you're 
typing "super" :-)

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Not as randy or clumsom as a blaster.
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to