Re: Some things I'd like

Jack Jansen (Jack.Jansen@cwi.nl)
Wed, 10 Aug 1994 10:52:55 GMT

Craig Lawson <claw@rahul.net> writes:

>Here are some things from my Python Wish List:
>1. PARENT keyword for referencing methods in a base class. Example:

> class a:
> def m(self): ...
> class b(a):
> def m(self): ... parent.m() ... # Calls a.m()
> class c(b):
> def m(self): ... parent.m() ... # Calls b.m()

I'm not sure how useful this idea is, but I'm pretty sure I wouldn't
like a new keyword. Also, the keyword only allows a single baseclass
to be specified, so how about
class b(parent=a):
def m(self): ... parent.m() ... # Calls a.m()

(although there will probably be scoping rule problems here with the
current implementation).

-- 
--
Jack Jansen        | If I can't dance I don't want to be part of
Jack.Jansen@cwi.nl | your revolution             -- Emma Goldman
uunet!cwi.nl!jack    G=Jack;S=Jansen;O=cwi;PRMD=surf;ADMD=400net;C=nl