Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109433

Re: Multiple inheritance, super() and changing signature

From Michael Selik <michael.selik@gmail.com>
Newsgroups comp.lang.python
Subject Re: Multiple inheritance, super() and changing signature
Date 2016-06-03 16:28 +0000
Message-ID <mailman.133.1464971617.1839.python-list@python.org> (permalink)
References (4 earlier) <d91f49c5-4572-9cc4-9688-b4b3ffbce691@shopzeus.com> <CALwzidnc=Yws6gSOpt_spYWGTJkq4zOuUmcVNuyF6Xuv3dK++Q@mail.gmail.com> <CAGgTfkO4g1bdBhZzZ4gaOgFRWOBXSgM4=uuPYWEFFDQBWSQVhw@mail.gmail.com> <36545ac2-0aab-3ee6-fb60-c539c9c7c95a@shopzeus.com> <CAGgTfkNu_Do8UecVF9+dDN5pxExGU++ho5vX6EsyLayvQ3_j=w@mail.gmail.com>

Show all headers | View raw


On Fri, Jun 3, 2016 at 12:01 PM Nagy László Zsolt <gandalf@shopzeus.com>
wrote:

> > Is the problem that the attribute or parameter has the same name in
> both base classes, but has different meanings in each?
> If they had different meanings, a simple rename would solve the problem.
>

Sometimes finding a good name ain't so simple.

> 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.
> One possible solution being encapsulating an object instead of
> inheriting from it?
>

That's one option, creating a wrapper class that dispatches almost
everything to the contained class, except with one renamed attribute/method.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Multiple inheritance, super() and changing signature Nagy László Zsolt <gandalf@shopzeus.com> - 2016-05-31 18:10 +0200
  Re: Multiple inheritance, super() and changing signature Steven D'Aprano <steve@pearwood.info> - 2016-06-01 12:18 +1000
    Re: Multiple inheritance, super() and changing signature Nagy László Zsolt <gandalf@shopzeus.com> - 2016-06-03 14:10 +0200
      Re: Multiple inheritance, super() and changing signature Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-04 13:06 +1200
        Re: Multiple inheritance, super() and changing signature Steven D'Aprano <steve@pearwood.info> - 2016-06-04 12:51 +1000
          Re: Multiple inheritance, super() and changing signature Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-04 23:50 +1200
        Re: Multiple inheritance, super() and changing signature Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-03 23:05 -0600
          Re: Multiple inheritance, super() and changing signature Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-04 23:52 +1200
            Re: Multiple inheritance, super() and changing signature Steven D'Aprano <steve@pearwood.info> - 2016-06-04 23:46 +1000
              Re: Multiple inheritance, super() and changing signature Nagy László Zsolt <gandalf@shopzeus.com> - 2016-06-04 16:42 +0200
    Re: Multiple inheritance, super() and changing signature Ben Finney <ben+python@benfinney.id.au> - 2016-06-03 22:21 +1000
      Re: Multiple inheritance, super() and changing signature Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-04 13:10 +1200
    Re: Multiple inheritance, super() and changing signature Nagy László Zsolt <gandalf@shopzeus.com> - 2016-06-03 14:14 +0200
    Re: Multiple inheritance, super() and changing signature Nagy László Zsolt <gandalf@shopzeus.com> - 2016-06-03 14:57 +0200
    Re: Multiple inheritance, super() and changing signature Nagy László Zsolt <gandalf@shopzeus.com> - 2016-06-03 16:06 +0200
    Re: Multiple inheritance, super() and changing signature Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-03 08:39 -0600
    Re: Multiple inheritance, super() and changing signature Michael Selik <michael.selik@gmail.com> - 2016-06-03 15:33 +0000
    Re: Multiple inheritance, super() and changing signature Nagy László Zsolt <gandalf@shopzeus.com> - 2016-06-03 17:59 +0200
    Re: Multiple inheritance, super() and changing signature Michael Selik <michael.selik@gmail.com> - 2016-06-03 16:28 +0000
    Re: Multiple inheritance, super() and changing signature Ben Finney <ben+python@benfinney.id.au> - 2016-06-04 06:16 +1000
    Re: Multiple inheritance, super() and changing signature Ben Finney <ben+python@benfinney.id.au> - 2016-06-04 06:19 +1000
    Re: Multiple inheritance, super() and changing signature Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-03 15:53 -0600
    Re: Multiple inheritance, super() and changing signature Ben Finney <ben+python@benfinney.id.au> - 2016-06-04 10:44 +1000

csiph-web