Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Michael Selik 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: References: <80ea0ea1-5468-2dee-2c38-c2b09801d0f1@shopzeus.com> <574e45f4$0$1611$c3e8da3$5496439d@news.astraweb.com> <36545ac2-0aab-3ee6-fb60-c539c9c7c95a@shopzeus.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: 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; '>': 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <80ea0ea1-5468-2dee-2c38-c2b09801d0f1@shopzeus.com> <574e45f4$0$1611$c3e8da3$5496439d@news.astraweb.com> <36545ac2-0aab-3ee6-fb60-c539c9c7c95a@shopzeus.com> Xref: csiph.com comp.lang.python:109433 On Fri, Jun 3, 2016 at 12:01 PM Nagy L=C3=A1szl=C3=B3 Zsolt 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= .