Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'example:': 0.03; 'from:addr:yahoo.co.uk': 0.04; 'explicitly': 0.05; 'arguments': 0.09; 'constructor': 0.09; 'derived': 0.09; 'lawrence': 0.09; 'method,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'language.': 0.14; '__new__': 0.16; 'created.': 0.16; 'expression.': 0.16; 'initialiser': 0.16; 'instance;': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'returned;': 0.16; 'runtime.': 0.16; 'wording': 0.16; 'language': 0.16; 'any,': 0.19; 'header:User-Agent:1': 0.23; 'header:X -Complaints-To:1': 0.27; 'raised': 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; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'changed': 0.39; 'received:org': 0.40; 'called': 0.40; 'ensure': 0.60; 'url:3': 0.61; 'our': 0.64; 'charset:windows-1252': 0.65; 'here': 0.66; 'special': 0.74; 'url:datamodel': 0.84; 'url:html#object': 0.84; 'url:reference': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: __init__ is the initialiser Date: Fri, 31 Jan 2014 19:33:37 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: host-78-147-20-107.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391196811 news.xs4all.nl 2933 [2001:888:2000:d::a6]:49679 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65135 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? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence