Beginner's question - class definition

Rainer Deyke root at rainerdeyke.com
Mon Jan 15 16:24:03 EST 2001


<banksam at swanhill.net.au> wrote in message
news:3a6366a8.4537644 at news.ruralnet.net.au...
> Can anyone explain please why the following definition ( from the
> Python documentation)
>
> class Complex:
> def _init_(self, realpart, imagpart):

Should be __init__ (i.e. two underscores to the left and two underscores to
the right).


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list