[Python-3000] Fixing super anyone?

Michele Cella michele.cella at gmail.com
Sat Apr 21 16:07:13 CEST 2007

Guido van Rossum wrote:
>> There's also the question of what the super keyword itself should look like,
>> e.g.
>>   # declaration-style, no dot
>>   res = super currentmethod(arg, arg)
>>   # treat super like self
>>   res = super.currentmethod (arg, arg)
>>   # treat super like self.currentmethod
>>   res = super(arg, arg)
>> I think super.currentmethod(arg, arg) makes the most sense, but that may be
>> because it most closely resembles the current practice. However, it may call
>> the "wrong" supermethod when the class does, for instance, '__repr__ =
>> __str__'.
> Depends on how you define "wrong". :-)
> I am strongly in favor of super.currentmethod(...) if only because
> that's closest to how we've always done it, and there may even be a
> use case for callong some *other* super method.

If super is going to be a keyword (+1) shouldn't it behave like any 
other keyword [1]?

I mean, it's there any keyword (ATM) that uses an attribute access syntax?

Personally, I really like this syntax:

res = super currentmethod(arg, arg)

Why? because it's very consistent (pythonic?) with the way I'm used to 
use any other keyword.

Anyway, thanks for fixing super in python 3000, it's probably the only 
python thing I really hate.

Excuse me if I sound like a noob, that's the first time I post to a 
python dev list.

[1] http://docs.python.org/ref/keywords.html

More information about the Python-3000 mailing list