Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35845 > unrolled thread
| Started by | Chris Rebert <clp2@rebertia.com> |
|---|---|
| First post | 2012-12-31 01:56 -0800 |
| Last post | 2012-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.
Re: father class name Chris Rebert <clp2@rebertia.com> - 2012-12-31 01:56 -0800
| From | Chris Rebert <clp2@rebertia.com> |
|---|---|
| Date | 2012-12-31 01:56 -0800 |
| Subject | Re: 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
Back to top | Article view | comp.lang.python
csiph-web