On Sun, Apr 16, 2006, Michael P. Soulier wrote:
> On 17/04/06 Greg Ewing said:
>> 
>> The other possible reason for using super() is so you don't have
>> to write the name of the base class into all your inherited method
>> calls. But that's a separate issue that would be better addressed by
>> a different mechanism, rather than conflating the two in super().
>
> Although you do have to put the current class name in the method
> calls, as super() requires it as the first argument. I never
> understood that. Why would I wish to use super(Bar) if I'm in class
> Foo? Cannot Foo be implied here?

Remember that in its current form super() is a regular function; it
cannot be implied without stack hackery.  The autosuper metaclass should
probably become part of the regular type metaclass in 3.0, but I think
that requires a PEP -- and in keeping with Guido's recent admonishment,
someone should probably try implementing it first and see what happens
with the test suite.
-- 
Aahz ([EMAIL PROTECTED])           <*>         http://www.pythoncraft.com/

"LL YR VWL R BLNG T S"
_______________________________________________
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