__init__ keyword param for sub-class?
Grant Edwards
grant at nowhere.
Thu Dec 23 16:09:10 EST 1999
Fred L. Drake, Jr. wrote:
>the only way to resolve it is to use the same search pattern as normal
>method lookup in C.__bases__. But it's not clear that its a good
>idea.
I guess it depends on how often multiple inheritence is used. I
come from a single-inheritence background (Smalltalk and
Modula-3), and haven't looked at enough Python code to have a
feel for that question. Worst case is you have to explicitly
specify the super-class if you want to guarantee which one of
multiple possiblities is chosen. Users of MI are then no worse
off than they are now -- and it would benefit the rest of us
that do things the "right" way. ;) [I'll admit, I can see that
MI could be useful.]
> There's also an issue of introducing new keywords or some way to
>name the thing called "super" in my example. I don't know of any
>languages that let you name it within; they all seem to use a
>keyword. And introducing new keywords is *hard*;
Yup, adding a keyword to a language is going to break programs,
and pretending otherwise is delusional. So, I don't see that
it would be a good idea unless it is part of a major change
that's going to break programs anyway.
--
Grant Edwards grante Yow! I wish I was on a
at Cincinnati street corner
visi.com holding a clean dog!
More information about the Python-list
mailing list