
April 30, 2007
4:43 p.m.
Delaney, Timothy (Tim) wrote:
What I'm proposing is that the `super = super_factory()` line be implicit in this case, resulting in the following code behaving identically:
class A(object): def f(self): def inner(): return 'A' + super.f()
print inner()
As Guido pointed out it has some resemblance to how import works, but I also think there is resemblance to the context of how global is used. So if it is made into a keyword, could it work like the global keyword? class A(object): def f(self): def inner(): super f return 'A' + f() print inner() Cheers, Ron