Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: =?UTF-8?Q?Nagy_L=c3=a1szl=c3=b3_Zsolt?= Newsgroups: comp.lang.python Subject: Re: Multiple inheritance, super() and changing signature Date: Fri, 3 Jun 2016 14:57:52 +0200 Lines: 33 Message-ID: References: <80ea0ea1-5468-2dee-2c38-c2b09801d0f1@shopzeus.com> <574e45f4$0$1611$c3e8da3$5496439d@news.astraweb.com> <85k2i65upp.fsf@benfinney.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de odFvQ11mipD1EiVok4omCwIpvEVhqHQLdzB7QZF6uL9A== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'initialize': 0.05; 'needed,': 0.05; ':-(': 0.07; 'false.': 0.07; 'override': 0.07; '__init__': 0.09; 'form?': 0.09; 'sake': 0.09; 'useful,': 0.13; 'attributes.': 0.16; 'explicitly,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'right:': 0.16; 'subject:changing': 0.16; 'sugar': 0.16; 'syntactic': 0.16; 'useless': 0.16; 'example.': 0.18; 'affected': 0.22; 'class,': 0.22; 'explicit': 0.22; 'pass': 0.22; 'leave': 0.23; 'this:': 0.23; 'tried': 0.24; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'that.': 0.30; 'call.': 0.30; 'class.': 0.30; 'raymond': 0.30; 'statement': 0.32; 'point': 0.33; 'useful': 0.33; 'class': 0.33; 'covered': 0.34; 'something': 0.35; 'but': 0.36; 'instead': 0.36; 'there': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'method': 0.37; 'one,': 0.37; 'seem': 0.37; '(with': 0.38; 'anything': 0.38; 'does': 0.39; 'expressed': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'default': 0.61; 'show': 0.62; 'watch': 0.62; 'different': 0.63; 'skip:\xe2 10': 0.70; '8bit%:43': 0.72; 'sound': 0.72; 'quality': 0.72; 'video,': 0.79 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopzeus.com; s=shopzeus_com; t=1464958673; bh=m3LABR/vgAmNTku/JTFMeh+j6t8r1FXlNecqqwU0uhY=; h=Subject:To:References:From:Date:In-Reply-To:From; b=IhFI8VVCY54EFrGXiCvrbwCGmhYpijM0yOSrBCaW+HvUC0k9Uf9KfoYeSYzkk41N5 E18IVVbgGbMfXeXwGg9B3Z7BZS5DL08U2mF5yw7deS+VXv1IZLGFFiDIFLxqVipJND 7pfycGX4UayXoFfXWKtB3y1hcTujp5Rn5IWaTiI8t3+aMoNXYXAIK6ZLvTKn3OP/dT VmSU/D6/hP4NCabuCDaWK54C9po/1A/DE5aNyXBQs6mP2KCKX4v6USqHZsGCcEavGQ pIS8Pc+x8X4gYdOTo4sa49uAu+SWuSI0Sl2AY7J1pVpag/OYcdlieDJgq+OurWfuW+ QeZxCvrAVm4nw== In-Reply-To: <85k2i65upp.fsf@benfinney.id.au> 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> <85k2i65upp.fsf@benfinney.id.au> Xref: csiph.com comp.lang.python:109412 >> But I have to initialize some default attributes. > Then the statement =E2=80=9Cthere is NOTHING else here=E2=80=9D must be= false. Either > the custom =E2=80=98__init__=E2=80=99 does something useful, or it does= n't. Well... the custom __init__ method with nothing else just a super() call was expressed there to show the super() call explicitly, and to emphasize that in that particular class, super() is used instead of an explicit base method call. It is not a pattern to be followed, just syntactic sugar for the sake of the example. So you are right: the custom __init__ in the BootstrapDesktop class is not really needed, and does not do anything useful in that particular class. My original statement was this: "I have to initialize some default attributes", and for that I need to pass arguments. The truthness of this statement is not affected by adding a useless override of a method (with the very same parameters). Even though I see that you are right in what you wrote, I think I don't understand the point because it seem unrelated. > All this is covered in Raymond Hettinger's material, so it's best that = I > just leave you to read that. > Is it available in written form? I have tried to watch the video, but the sound quality is so poor that I cannot understand. I have tried to search for a better one, but that is a different one. :-(