__init__

Patrick Dussud (dussud@lucid.com)
Tue, 18 May 93 09:09:33 PDT

From: Guido.van.Rossum@cwi.nl
X-Organization: CWI (Centrum voor Wiskunde en Informatica)
X-Address: P.O. Box 4079, 1009 AB Amsterdam, The Netherlands
X-Phone: +31 20 5924127 (work), +31 20 6225521 (home), +31 20 5924199 (fax)
Date: Tue, 18 May 1993 17:08:38 +0200
Sender: Guido.van.Rossum@cwi.nl

> The Lisp community faced the same problem. Flavors and then CLOS adopted
> solution 1 with the convention that initialization values should be keyword
> arguments. They have the form <key> <value>. The original list is passed to
> all of the methods, which are free to pick the arguments they care about. I
> don't see how 1 can work without keyword argument, so I guess that 2 would be
> better in the context of Python.

Are you sure you haven't reversed the options? My option 1 calls only
the derived class' __init__ and leaves it up to that method to call
the base class' __init__. My option 2 calls all base* class __init__
methods (buttom up) with the same argument list. This sounds like the
reverse of what you're describing...

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>

Right you are.

Patrick.