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


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

Re: father class name

Started byChris Rebert <clp2@rebertia.com>
First post2012-12-31 01:56 -0800
Last post2012-12-31 01:56 -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: father class name Chris Rebert <clp2@rebertia.com> - 2012-12-31 01:56 -0800

#35845 — Re: father class name

FromChris Rebert <clp2@rebertia.com>
Date2012-12-31 01:56 -0800
SubjectRe: father class name
Message-ID<mailman.1495.1356947802.29569.python-list@python.org>
On Mon, Dec 31, 2012 at 1:23 AM, Ben Finney <ben+python@benfinney.id.au> wrote:
> Chris Rebert <clp2@rebertia.com> writes:
>
>> By contrast, in the first part of the *expression*
>> `haha(object).theprint()`, you passed an argument (namely, `object`).
>> Since __init__() wasn't expecting any arguments whatsoever, you
>> therefore got an error.
>
> Why is everyone talking about the initialiser, ‘__init__’?
>
> When:
>
>> >>>> haha(object).theprint()
>> > Traceback (most recent call last):
>> >   File "<stdin>", line 1, in <module>
>> > TypeError: object.__new__() takes no parameters
>
> The error is talking about the constructor, ‘__new__’.

Because the difference between the two (and indeed, the very purpose
of the latter) is a topic of intermediate/advanced difficulty, and the
OP appears to be a newbie.
As I stated, but your quotation omitted:
>> Note: I'm oversimplifying things a bit for the sake of understandability.

Cheers,
Chris

[toc] | [standalone]


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


csiph-web