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


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

Re: __init__ is the initialiser

Started byEthan Furman <ethan@stoneleaf.us>
First post2014-01-31 11:43 -0800
Last post2014-01-31 11:43 -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 11:43 -0800

#65140 — Re: __init__ is the initialiser

FromEthan Furman <ethan@stoneleaf.us>
Date2014-01-31 11:43 -0800
SubjectRe: __init__ is the initialiser
Message-ID<mailman.6220.1391200299.18130.python-list@python.org>
On 01/31/2014 11:33 AM, Mark Lawrence wrote:
>  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?

I would say yes.  Go ahead and create an issue if one doesn't already exist.  Thanks.

--
~Ethan~

[toc] | [standalone]


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


csiph-web