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


Groups > comp.lang.python > #30544

Re: Should one always add super().__init__() to the __init__?

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.060
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'arguments': 0.07; 'class,': 0.07; '__init__': 0.09; 'sep': 0.09; 'sat,': 0.15; 'at.': 0.16; 'wrote:': 0.17; 'header:In-Reply-To:1': 0.25; 'skip:" 20': 0.26; 'message-id:@mail.gmail.com': 0.27; 'steven': 0.29; 'not.': 0.32; 'could': 0.32; 'getting': 0.33; 'to:addr:python- list': 0.33; 'received:google.com': 0.34; 'needed': 0.35; 'whatever': 0.35; 'pm,': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'believe': 0.69; 'change?': 0.84; 'subject:always': 0.84; 'to:name:python': 0.84; 'subject:add': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=QOZ8QqwSpyMlaJNgCdzsRE+fTSehOLks8X83TZcq3ks=; b=0ojayByrKiFZCemOcVUa3MfVudAXfXLFmK7veTbgOEmtH2Zuw8JjnDxiRcqr3WzR5i hfkur8J3c4BkhFedm+wZkzXTG5FTv1lIj1OQuhkdvk1V2Q6F0kODzR1z6mu6osoaY6kH aj4k7ME+Ys9NdjF807lXSoY4BZkflqD7taB9nn4xmyqb0MKMpcMwhIi+Puih2mxhggm5 zJhUFQE9rw9DdjOUw8qYritqSFPtcgZPksq/TNBmvGtKDCujmcBR/Cvo8j032VkK7sSU JzbhRdSI4QTghXZ3XTUhtif2gg9VGzoh5MkOBH5CvJpB4uY0NkooqslwCRxwgGLOab6A rTpQ==
MIME-Version 1.0
In-Reply-To <66f99af0-39c2-4ef1-8f1e-dac17924432f@googlegroups.com>
References <d8fc9d99-8dc0-4290-88a0-33cd38d09f7d@googlegroups.com> <50672d20$0$29981$c3e8da3$5496439d@news.astraweb.com> <46096186-8383-4990-99c9-61c87f1c5a2f@googlegroups.com> <5067c951$0$29981$c3e8da3$5496439d@news.astraweb.com> <66f99af0-39c2-4ef1-8f1e-dac17924432f@googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Sun, 30 Sep 2012 00:10:08 -0600
Subject Re: Should one always add super().__init__() to the __init__?
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1664.1348985440.27098.python-list@python.org> (permalink)
Lines 7
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1348985441 news.xs4all.nl 6859 [2001:888:2000:d::a6]:47392
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:30544

Show key headers only | View raw


On Sat, Sep 29, 2012 at 10:55 PM, Ramchandra Apte
<maniandram01@gmail.com> wrote:
> When I said "super().__init__()" it could have been "super().__init__(size+67)" or whatever arguments are needed for __init__

But if you change the base class, couldn't those arguments change?
Then you would have to change the call whether super is used or not.
I believe this is what Steven is getting at.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Should one always add super().__init__() to the __init__? Ramchandra Apte <maniandram01@gmail.com> - 2012-09-29 06:27 -0700
  Re: Should one always add super().__init__() to the __init__? Ramchandra Apte <maniandram01@gmail.com> - 2012-09-29 06:28 -0700
  Re: Should one always add super().__init__() to the __init__? Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-29 10:59 -0600
  Re: Should one always add super().__init__() to the __init__? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-29 17:17 +0000
    Re: Should one always add super().__init__() to the __init__? Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-09-29 14:18 -0400
    Re: Should one always add super().__init__() to the __init__? Chris Angelico <rosuav@gmail.com> - 2012-09-30 04:31 +1000
      Re: Should one always add super().__init__() to the __init__? Piet van Oostrum <piet@vanoostrum.org> - 2012-09-29 17:51 -0400
        Re: Should one always add super().__init__() to the __init__? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-30 04:40 +0000
          Re: Should one always add super().__init__() to the __init__? Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-30 00:08 -0600
            Re: Should one always add super().__init__() to the __init__? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-30 09:34 +0000
              Re: Should one always add super().__init__() to the __init__? Manuel Pégourié-Gonnard <mpg@elzevir.fr> - 2012-09-30 14:04 +0200
      Re: Should one always add super().__init__() to the __init__? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-30 04:37 +0000
        Re: Should one always add super().__init__() to the __init__? Chris Angelico <rosuav@gmail.com> - 2012-09-30 14:53 +1000
        Re: Should one always add super().__init__() to the __init__? Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-30 01:13 -0600
    Re: Should one always add super().__init__() to the __init__? Ramchandra Apte <maniandram01@gmail.com> - 2012-09-29 20:14 -0700
      Re: Should one always add super().__init__() to the __init__? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-30 04:23 +0000
        Re: Should one always add super().__init__() to the __init__? Ramchandra Apte <maniandram01@gmail.com> - 2012-09-29 21:55 -0700
          Re: Should one always add super().__init__() to the __init__? Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-30 00:10 -0600

csiph-web