Multiple inheritance, super() and changing signature

Michael Selik michael.selik at gmail.com
Fri Jun 3 11:33:11 EDT 2016


On Fri, Jun 3, 2016 at 10:41 AM Ian Kelly <ian.g.kelly at gmail.com> wrote:

> On Fri, Jun 3, 2016 at 8:06 AM, Nagy László Zsolt <gandalf at shopzeus.com>
> wrote:
> > There is still something I don't get: how to create cooperative classes
> > when some base classes share some of the parameters?
>
> Why do they need to share the same parameter?
>

Is the problem that the attribute or parameter has the same name in both
base classes, but has different meanings in each?

If so, and you're in control of every class in the inheritance hierarchy,
perhaps you can come up with more specific names so that the bases no
longer share the same attribute.

If you can't change the base classes, I've got some other solutions, but
they're more involved, so I'll wait to hear back.



More information about the Python-list mailing list