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


Groups > comp.lang.python > #65153

Re: __init__ is the initialiser

Date 2014-01-31 16:13 -0800
From Ethan Furman <ethan@stoneleaf.us>
Subject Re: __init__ is the initialiser
References <lcgtpf$tui$1@ger.gmane.org> <lcgut2$b8r$1@ger.gmane.org> <858utviwgs.fsf@benfinney.id.au> <lchce7$44q$1@ger.gmane.org>
Newsgroups comp.lang.python
Message-ID <mailman.6233.1391214984.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 01/31/2014 03:43 PM, Ned Batchelder wrote:
> On 1/31/14 6:05 PM, Ben Finney wrote:
>> Ned Batchelder writes:
>
> I'm not hoping to change any official terminology. I just think that calling __init__ anything other than a constructor
> is confusing pedantry.  It is a constructor, and Python constructors work differently than those in C++ and Java.

And I would say the opposite.  __init__ is not creating anything, which is what I think of when speaking of a 
constructor.  I'd be willing to yield the point that Python has a pair of methods that make up the constructor (an 
allocator and an initializer), but I found calling __init__ the constructor very confusing.

--
~Ethan~

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


Thread

Re: __init__ is the initialiser Ethan Furman <ethan@stoneleaf.us> - 2014-01-31 16:13 -0800
  Re: __init__ is the initialiser Roy Smith <roy@panix.com> - 2014-01-31 20:10 -0500
    Re: __init__ is the initialiser MRAB <python@mrabarnett.plus.com> - 2014-02-01 01:41 +0000
      Re: __init__ is the initialiser Roy Smith <roy@panix.com> - 2014-01-31 20:53 -0500
    Re: __init__ is the initialiser Ethan Furman <ethan@stoneleaf.us> - 2014-01-31 18:35 -0800
    Dunder [was Re: __init__ is the initialiser] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-02-01 02:52 +0000
      Re: Dunder [was Re: __init__ is the initialiser] MRAB <python@mrabarnett.plus.com> - 2014-02-01 03:04 +0000
      Re: Dunder [was Re: __init__ is the initialiser] Chris Angelico <rosuav@gmail.com> - 2014-02-01 15:05 +1100
        Re: Dunder [was Re: __init__ is the initialiser] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-02-01 05:53 +0000

csiph-web