Stu Rocksan wrote:

class Complex:
              def _init_(self, realpart, imagpart)


Special methods in Python have TWO underscores at the beginning and end. You need to call it __init__ rather than _init_.

Also, are you aware that Python already includes a built-in complex type?

>>> complex(1, 2)
(1+2j)



--
Steven
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to