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 15:33:11 +0000 Lines: 20 Message-ID: References: <80ea0ea1-5468-2dee-2c38-c2b09801d0f1@shopzeus.com> <574e45f4$0$1611$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de kfrMaTvUyttpflnRleWoVw2nw0sN6MrhSzU/LGqSEl/w== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.037 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'classes,': 0.05; 'attribute.': 0.09; '2016': 0.16; 'hierarchy,': 0.16; 'inheritance': 0.16; 'involved,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:changing': 0.16; 'wrote:': 0.16; 'attribute': 0.18; '>': 0.18; 'email addr:gmail.com>': 0.18; 'to:2**1': 0.21; 'parameter': 0.22; 'am,': 0.23; 'header:In-Reply- To:1': 0.24; "i've": 0.25; 'fri,': 0.27; 'message- id:@mail.gmail.com': 0.27; 'back.': 0.27; 'classes': 0.30; "can't": 0.32; 'class': 0.33; 'problem': 0.33; "i'll": 0.33; 'received:google.com': 0.35; 'so,': 0.35; 'something': 0.35; 'but': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'names': 0.38; 'why': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'some': 0.40; 'share': 0.61; 'bases': 0.63; 'more': 0.63; 'different': 0.63; 'hear': 0.64; "they're": 0.66; 'nagy': 0.84; 'to:name:python': 0.84; 'cooperative': 0.93 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=A1LcmlQtxR9OeLW0TFScKATO1ViQ5eZDEXEf4C3MO+o=; b=J+021WxM/L83qcQVqzg9U+0lMzAbOKtkGVkJnz+bv2QxqVudVt9JFUWiFtJS5rtAre A7PY0HgcZCOfBOfVt07jduvoIrBM9tlt+y0WNfwZ34d4YikHw/4F3I9ZJc6Mxd75WWGB 6h1+YxHwTeizJZUhz/o1YLbmbwYoA2K6NJYXnUzlRsIw1xyuhqQkPMtk4TC4Zu7hgLqj oWjyTppoAiwFZeHp++9L+/9p1FTOTg5a+hnzTsli88KEpH+8b70VGxBWa41fBLUkVyLZ 0lfoG5c4ASR2zp9jq09DBfyT6m4/zb5Axl2J0DzZtpl0grIBYnw4lcNc+lSL0be25JCE PKKg== 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=A1LcmlQtxR9OeLW0TFScKATO1ViQ5eZDEXEf4C3MO+o=; b=cyGiBKQ4BuAseF2m55jaAWQEiT5Yg4t1i+CGGcwhrhrB0vFmfAk0YNIyWnbzvDJ1HG GTqMKTtGBpuH4xVEOjaXDq551DAedcEQgDlVieN+3pXJZyIVdbW0aMMGTzwX6/kt2U34 fkwKbo+pF577H+aq6eZc7pJcZWg6YpOmcng0kYJaLbqqCe4MnSoV56c7FPV0l9TxHV6M dwTnMfATIjks/Z6DvDf3wr9p46eHaqZAV+nlbdULkF0kXdLfeTW5sML16ZYhATY2Vyxk l8Ivu9A25/Vlq59CEN36j8ykPv0Lwr6lKD+0xsSsoKQZbZjOIz3CLmM7CvR2GNrQ9krC +rzg== X-Gm-Message-State: ALyK8tJgtX/XyoRgNTMfbLUiim3DSAZ5pBpUqvlXiTw8ukhU58gJVyLOYwYpj4hUW0hqOs/Qht0pzO7I1opG0A== X-Received: by 10.140.39.166 with SMTP id v35mr3458507qgv.93.1464968001580; Fri, 03 Jun 2016 08:33:21 -0700 (PDT) In-Reply-To: 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> Xref: csiph.com comp.lang.python:109420 On Fri, Jun 3, 2016 at 10:41 AM Ian Kelly wrote: > On Fri, Jun 3, 2016 at 8:06 AM, Nagy L=C3=A1szl=C3=B3 Zsolt > 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.