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


Groups > comp.lang.python > #65152

Re: __init__ is the initialiser

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.019
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'purpose.': 0.07; 'constructor': 0.09; 'instance.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '\xe2\x80\x94': 0.09; '__init__,': 0.16; 'finney': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'header:User- Agent:1': 0.23; 'java': 0.24; 'looks': 0.24; 'developers': 0.25; 'header:X-Complaints-To:1': 0.27; 'function': 0.29; 'contract,': 0.30; 'code': 0.31; 'writes:': 0.31; 'subject:the': 0.34; 'c++': 0.36; 'raising': 0.36; 'received:com.au': 0.36; 'thanks': 0.36; 'ben': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'new': 0.61; 'skip:\xe2 10': 0.65; 'here': 0.66; 'sir,': 0.81; 'batchelder': 0.84; 'points,': 0.84; 'received:125': 0.84; '8bit%:33': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Ben Finney <ben+python@benfinney.id.au>
Subject Re: __init__ is the initialiser
Date Sat, 01 Feb 2014 10:59:37 +1100
References <lcgtpf$tui$1@ger.gmane.org> <lcgut2$b8r$1@ger.gmane.org> <858utviwgs.fsf@benfinney.id.au> <lchce7$44q$1@ger.gmane.org>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host vmx15867.hosting24.com.au
X-Public-Key-ID 0xBD41714B
X-Public-Key-Fingerprint 9CFE 12B0 791A 4267 887F 520C B7AC 2E51 BD41 714B
X-Public-Key-URL http://www.benfinney.id.au/contact/bfinney-gpg.asc
X-Post-From Ben Finney <bignose+hates-spam@benfinney.id.au>
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Cancel-Lock sha1:tyN+iBN2RX+WsJoNenpsTYGuWrk=
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.6232.1391212793.18130.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1391212793 news.xs4all.nl 2916 [2001:888:2000:d::a6]:54157
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:65152

Show key headers only | View raw


Ned Batchelder <ned@nedbatchelder.com> writes:

> On 1/31/14 6:05 PM, Ben Finney wrote:
> > Here we disagree. I think the meaning “… and that returns the new
> > instance” is entailed in the meaning of “constructor”.
> > […]
>
> You say these terms already have meanings, and that constructor means
> a function that returns the new instance. Then your word "constructor"
> isn't the same as C++'s word "constructor"? Those don't return the
> instance. Neither do Java constructors. In terms of the code
> developers actually write in __init__, it looks an awful lot like a
> C++ or Java constructor, and serves precisely the same purpose.

These are good points, thanks for raising them.

-- 
 \     Lucifer: “Just sign the Contract, sir, and the Piano is yours.” |
  `\     Ray: “Sheesh! This is long! Mind if I sign it now and read it |
_o__)                                later?” —http://www.achewood.com/ |
Ben Finney

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


Thread

Re: __init__ is the initialiser Ben Finney <ben+python@benfinney.id.au> - 2014-02-01 10:59 +1100

csiph-web