father class name
Ben Finney
ben+python at benfinney.id.au
Mon Dec 31 04:23:44 EST 2012
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__’?
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__’.
--
\ “It's dangerous to be right when the government is wrong.” |
`\ —Francois Marie Arouet Voltaire |
_o__) |
Ben Finney
More information about the Python-list
mailing list