I'm trying to teach myself Python, and doing well for the most part. However, when I try to run the code
class Equilateral(object):
angle = 60
def __init__(self):
self.angle1, self.angle2, self.angle3 = angle
tri = Equilateral()
I get the following error:
Traceback (most recent call last):
File "python", line 15, in <module>
File "python", line 13, in __init__
NameError: global name 'angle' is not defined
There is probably a very simple answer, but why is this happening?