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


Groups > comp.lang.python > #65155 > unrolled thread

Re: __init__ is the initialiser

Started byMark Lawrence <breamoreboy@yahoo.co.uk>
First post2014-02-01 00:51 +0000
Last post2014-02-01 00:51 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: __init__ is the initialiser Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-01 00:51 +0000

#65155 — Re: __init__ is the initialiser

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-02-01 00:51 +0000
SubjectRe: __init__ is the initialiser
Message-ID<mailman.6235.1391215880.18130.python-list@python.org>
On 01/02/2014 00:13, Ethan Furman wrote:
> 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~

Here's what help says.

Python 3.4.0b2 (v3.4.0b2:ba32913eb13e, Jan  5 2014, 16:23:43) [MSC 
v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> help(object.__new__)
Help on built-in function __new__:

__new__(...)
     T.__new__(S, ...) -> a new object with type S, a subtype of T

 >>> help(object.__init__)
Help on wrapper_descriptor:

__init__(...)
     x.__init__(...) initializes x; see help(type(x)) for signature

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web