[Python-Dev] Classes and Metaclasses in Smalltalk

Thomas Heller thomas.heller@ion-tof.com
Wed, 2 May 2001 16:06:39 +0200


/F:
> guido wrote:
> 
> > > class MyClass (BaseClass):
> > >     def foo (self, arg1, arg2):
> > >          super.foo(arg1, arg2)
> >
> > I'm sure that's everybody's favorite way to spell it!
> 
> not mine.  my brain contains far too much Python 1.5.2 code
> for it to accept that some variables are dynamically scoped,
> while others are lexically scoped.
> 
> why not spell it out:
> 
>     self.__super__.foo(arg1, arg2)
> 
> or
> 
>     self.super.foo(arg1, arg2)
> 
> or
> 
>     super(self).foo(arg1, arg2)
IMO we still need to specify the class, and there we are:

     super(self, MyClass).foo(arg1, arg2)

Thomas