Re: Class method handles in C

Guido.van.Rossum@cwi.nl
Fri, 04 Mar 1994 23:59:31 +0100

(I am reading my mail in reverse order tonight :-)

Between the two of us we have answered most of your own questions
already, but this one I can't let go... It's a subtle but important
(to me!) difference:

> There is never an instance to use to register the __init__() method
> because the point of the method is to create a new instance.

No it is not -- as the name suggests, __init__() *initializes* an
(already created) instance. It's a "hook" on instance creation, not
instance creation itself.

> Is call_object() smart enough to know that if it is given a handle
> to a Class object then it automatically calls the constructor?

You are probably thinking of C++ constructors. Please forget C++ as
a role model for Python -- it only serves to confuse you.

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>