__init__ is the initialiser

Roy Smith roy at panix.com
Fri Jan 31 20:53:42 EST 2014


In article <mailman.6238.1391218886.18130.python-list at python.org>,
 MRAB <python at mrabarnett.plus.com> wrote:

> You could argue that construction is not complete until the instance
> has been initialised. In the case of C++, all you have is the
> initialiser, so doesn't really matter, but Python has __new__ and
> __init__, so it _does_ matter.

C++ has operator new (which you can override) and the constructor.



More information about the Python-list mailing list