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


Groups > comp.lang.python > #109425

Re: Multiple inheritance, super() and changing signature

Path csiph.com!weretis.net!feeder4.news.weretis.net!storethat.news.telefonica.de!feedme.news.telefonica.de!telefonica.de!fu-berlin.de!uni-berlin.de!not-for-mail
From Nagy László Zsolt <gandalf@shopzeus.com>
Newsgroups comp.lang.python
Subject Re: Multiple inheritance, super() and changing signature
Date Fri, 3 Jun 2016 17:59:24 +0200
Lines 17
Message-ID <mailman.130.1464969564.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>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de gUqvTGVsf2gm1osXfwquygHvJbD2AXoDkqSwcTac7dFw==
Return-Path <gandalf@shopzeus.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.057
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; 'classes,': 0.05; 'rename': 0.07; 'worked.': 0.09; ':-)': 0.12; 'involved,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:changing': 0.16; 'attribute': 0.18; 'parameter': 0.22; 'header:In-Reply- To:1': 0.24; "i've": 0.25; 'back.': 0.27; 'classes': 0.30; 'help!': 0.30; "can't": 0.32; 'class': 0.33; 'problem': 0.33; 'common': 0.33; "i'll": 0.33; 'problem.': 0.35; 'but': 0.36; 'instead': 0.36; 'possible': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'thank': 0.38; 'to:addr:python.org': 0.40; 'some': 0.40; 'your': 0.60; 'more': 0.63; 'different': 0.63; 'hear': 0.64; "they're": 0.66; 'fortunately,': 0.84; 'solved.': 0.84; 'cooperative': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopzeus.com; s=shopzeus_com; t=1464969562; bh=gV+kD+E2PpNgGaEz9jDOpYoOPNr03LXj5GLwK6ofQ0s=; h=Subject:To:References:From:Date:In-Reply-To:From; b=gn6goi8lH5Dm/djwzOUpbNMZexZirNja9SRUW3KG4PjWtcHFkHbVEnsCYzdBdVr33 FB8Iq1i3aWtwQumdhvr8VqlTwX7WlHpGNxtkVWiXpeHyh+es5hzvoMaV1I+93OQosc u6fe/rtwzJlekYqB3vhj03M+VQIpvLXDf6UZJBQEzqmwGPaHJNEhL06uev1BRcd0qK FI06CgZvglOvxLtuA2Cl5ISLuZyGQuRKJct8pstsWuZndx6VJOCuhFuW1/BxwN8D3o dlT8Ih3aEhwXqHwMXRDNNbDLs0NJp5UVNSe15MjSz1/62P/M5WxfT6w2GEhFT8xSKw izijdxS5C893Q==
In-Reply-To <CAGgTfkO4g1bdBhZzZ4gaOgFRWOBXSgM4=uuPYWEFFDQBWSQVhw@mail.gmail.com>
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 <36545ac2-0aab-3ee6-fb60-c539c9c7c95a@shopzeus.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>
Xref csiph.com comp.lang.python:109425

Show key headers only | View raw


> 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. 
They have the same meaning.

> 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?

Fortunately, I can change all of the classes, and extracting the common 
parameter into a common base class worked.

Problem solved. Thank you for all your help!

Cooperative classes are fantastic! :-)

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