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


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

Re: __init__ is the initialiser

Started byEthan Furman <ethan@stoneleaf.us>
First post2014-01-31 16:13 -0800
Last post2014-01-31 16:13 -0800
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 Ethan Furman <ethan@stoneleaf.us> - 2014-01-31 16:13 -0800

#65154 — Re: __init__ is the initialiser

FromEthan Furman <ethan@stoneleaf.us>
Date2014-01-31 16:13 -0800
SubjectRe: __init__ is the initialiser
Message-ID<mailman.6234.1391214997.18130.python-list@python.org>
On 01/31/2014 03:47 PM, Ben Finney wrote:
>
> I would prefer it to be clear that “__init__” is called automatically,
> *during* the constructor's operation. So, instead of:
>
>      Called when the instance is created.
>
> I suggest:
>
>      Called automatically by the constructor “__new__” during instance
>      creation, to initialise the new instance.

But __new__ does not call __init__, type does [1].

--
~Ethan~

[1] And I seem to think pickle does, too, but I'm not sure.

[toc] | [standalone]


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


csiph-web