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


Groups > comp.lang.python > #109433

Re: Multiple inheritance, super() and changing signature

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Michael Selik <michael.selik@gmail.com>
Newsgroups comp.lang.python
Subject Re: Multiple inheritance, super() and changing signature
Date Fri, 03 Jun 2016 16:28:20 +0000
Lines 20
Message-ID <mailman.133.1464971617.1839.python-list@python.org> (permalink)
References <80ea0ea1-5468-2dee-2c38-c2b09801d0f1@shopzeus.com> <mailman.54.1464711627.1839.python-list@python.org> <574e45f4$0$1611$c3e8da3$5496439d@news.astraweb.com> <a17955cb-04d3-9dd6-e2b3-4719269f241d@shopzeus.com> <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>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de uhmoKGUvOYZlxKK69CBIMAHjW5XIq30WPf5sJ+1QhYMA==
Return-Path <michael.selik@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'classes,': 0.05; 'option,': 0.07; 'rename': 0.07; 'wrapper': 0.07; "ain't": 0.09; '2016': 0.16; 'involved,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'renamed': 0.16; 'simple.': 0.16; 'subject:changing': 0.16; 'wrote:': 0.16; 'attribute': 0.18; '&gt;': 0.18; 'to:2**1': 0.21; 'class,': 0.22; 'parameter': 0.22; 'header:In-Reply-To:1': 0.24; "i've": 0.25; 'fri,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'back.': 0.27; 'creating': 0.30; "can't": 0.32; 'class': 0.33; 'problem': 0.33; "i'll": 0.33; 'except': 0.34; 'received:google.com': 0.35; 'problem.': 0.35; 'sometimes': 0.35; 'but': 0.36; 'instead': 0.36; 'received:209.85': 0.36; 'possible': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'received:209': 0.38; 'received:209.85.220': 0.38; 'to:addr:python.org': 0.40; 'some': 0.40; 'more': 0.63; 'different': 0.63; 'hear': 0.64; "they're": 0.66; 'nagy': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Dls7OAGWFp0dc+XhKM9N6DPZWdxxGOzqqaokF7Z6ZVc=; b=RMk/JMHznVXdjwFRu1Iqqeci+PsSfuwMAIX6meLe+1O1cNuYEDea+QEsFo0rjGVjUz ew6hXB+5I0dh6NHqYiHUmCGZVENB4bNKmX22+cyQmzjFbPi/hVT21pP0o/Z9+lZhsNV3 Os0oCnWmldW55Faw/ah8DfwQ1+o7vfFil4wj78TeCV4KBWcZ8Bm5AelEPlYHQ4dl8P2f A6x6Oxr3roCQrLm7CHz8jt6imPSAmILfmXNUZaALHSTYhGpSz+YozVO8PuR69fxgxmDq uiCpzR2x2N2MOmPTAp8CsjWTHBuxw9nnsNidCgbFCcrk30FmbY6He7yLH611jtCfwzN7 LbqQ==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Dls7OAGWFp0dc+XhKM9N6DPZWdxxGOzqqaokF7Z6ZVc=; b=RKfB9WIQ/FooGwgUKlQRGw/9oHfZ/83zm8x7HbX7K+xxUcnSgs5e7yOFFUOS2ODL4Q 0Vz/nuqAbgVl0aLvFdr3OBeL5FuzDdSllI3KvgttcpjsKtpTnDGJgfn8oGon/AGjwpik BWbGp6HFHsp6+06eB4xwhSUgmhs2SgwZUZdOwu3YGUy9jOGkfmOAu7hUB1J5N7pNFwhy f4JeODy56FoZjikVZeOunSS5qSs4AXBzXmIh4eBY9w228BCSqDR15dDnja/PDL9BcBQg j8YhYn079/r5L5e7JL1U1pJdp2WfEZ3GVKFuLNA6FGNbsL0NOjlYQColuiorZ6ACwn6k UF9w==
X-Gm-Message-State ALyK8tI1bnXW622OMwgoTCWaVMpylY97rYG0yy/6elXqzKs82N13wEQLxW1jHVWNz43Y0Q2Bq2wyV/KmhJMujg==
X-Received by 10.55.151.199 with SMTP id z190mr3965057qkd.172.1464971310316; Fri, 03 Jun 2016 09:28:30 -0700 (PDT)
In-Reply-To <36545ac2-0aab-3ee6-fb60-c539c9c7c95a@shopzeus.com>
X-Content-Filtered-By Mailman/MimeDel 2.1.22
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <CAGgTfkNu_Do8UecVF9+dDN5pxExGU++ho5vX6EsyLayvQ3_j=w@mail.gmail.com>
X-Mailman-Original-References <80ea0ea1-5468-2dee-2c38-c2b09801d0f1@shopzeus.com> <mailman.54.1464711627.1839.python-list@python.org> <574e45f4$0$1611$c3e8da3$5496439d@news.astraweb.com> <a17955cb-04d3-9dd6-e2b3-4719269f241d@shopzeus.com> <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>
Xref csiph.com comp.lang.python:109433

Show key headers only | 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