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?
>>> comp
On 2011/09/09 12:10 PM, Stu Rocksan wrote:
I have a very basic question that I am sure has a simple answer. I
would be very appreciative of anyone that would set me straight.
Python 2.7.2
I am simply trying to pass arguments. Based on the documentation that
I've read so far _init_() is called
I have a very basic question that I am sure has a simple answer. I
would be very appreciative of anyone that would set me straight.
Python 2.7.2
I am simply trying to pass arguments. Based on the documentation that
I've read so far _init_() is called upon instance creation and the
arguments are