A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-May/014531.html below:

[Python-Dev] Classes and Metaclasses in Smalltalk

[Python-Dev] Classes and Metaclasses in SmalltalkThomas 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




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4