Path: csiph.com!usenet.pasdenom.info!gegeweb.org!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'example:': 0.03; 'explicitly': 0.05; 'arguments': 0.09; 'constructor': 0.09; 'derived': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'lawrence': 0.09; 'message-id:@stoneleaf.us': 0.09; 'method,': 0.09; '~ethan~': 0.09; '__new__': 0.16; 'created.': 0.16; 'exist.': 0.16; 'expression.': 0.16; 'initialiser': 0.16; 'instance;': 0.16; 'returned;': 0.16; 'runtime.': 0.16; 'wording': 0.16; 'wrote:': 0.18; 'any,': 0.19; 'thanks.': 0.20; 'header:User- Agent:1': 0.23; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'raised': 0.31; 'yes.': 0.31; 'class': 0.32; 'url:python': 0.33; 'subject:the': 0.34; 'reflect': 0.36; 'doing': 0.36; 'url:org': 0.36; 'should': 0.36; 'ahead': 0.38; 'to:addr :python-list': 0.38; 'issue': 0.38; 'to:addr:python.org': 0.39; 'changed': 0.39; 'called': 0.40; 'ensure': 0.60; 'url:3': 0.61; 'received:173': 0.61; 'charset:windows-1252': 0.65; 'here': 0.66; 'special': 0.74; 'url:datamodel': 0.84; 'url:html#object': 0.84; 'url:reference': 0.84 Date: Fri, 31 Jan 2014 11:43:32 -0800 From: Ethan Furman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: python-list@python.org Subject: Re: __init__ is the initialiser References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3304.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source-IP: 173.12.184.233 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([173.12.184.233]) [173.12.184.233]:35613 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 3 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3IzMzA0Lmhvc3RnYXRvci5jb20= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391200299 news.xs4all.nl 2956 [2001:888:2000:d::a6]:50024 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65140 On 01/31/2014 11:33 AM, Mark Lawrence wrote: > From http://docs.python.org/3/reference/datamodel.html#object.__init__ which states:- > > " > Called when the instance is created. The arguments are those passed to the class constructor expression. If a base class > has an __init__() method, the derived class’s __init__() method, if any, must explicitly call it to ensure proper > initialization of the base class part of the instance; for example: BaseClass.__init__(self, [args...]). As a special > constraint on constructors, no value may be returned; doing so will cause a TypeError to be raised at runtime. > " > > Should the wording of the above be changed to clearly reflect that we have an initialiser here and that __new__ is the > constructor? I would say yes. Go ahead and create an issue if one doesn't already exist. Thanks. -- ~Ethan~