father class name
clp2 at rebertia.com
Mon Dec 31 10:56:34 CET 2012
On Mon, Dec 31, 2012 at 1:23 AM, Ben Finney <ben+python at benfinney.id.au> wrote:
> Chris Rebert <clp2 at 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__’?
>> >>>> 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.
More information about the Python-list