Does 'super' exist?
Martin von Loewis
loewis at informatik.hu-berlin.de
Sun Dec 9 19:54:02 CET 2001
"Bruce Eckel" <Bruce at EckelObjects.com> writes:
> Thanks. Looks like the syntax for calling the base-class B's
> constructor would then be:
> super(B, self).__init__()
> I see the value of super() for MI but I was thinking I might get a
> free ride in the form of less typing for SI base-class calls. Oh
Please understand that the type unification stuff only got as far as
doing semantics; all of the syntax is left for later. There is still a
lot to be desired; I don't like having to write __slots__ for example
- I'd prefer proper syntax.
Likewise, super doesn't add any new syntax - it really is a call that
you are performing (even though super is a type object, so it isn't a
function call). I guess proposals for syntax are welcome.
More information about the Python-list