为什么我会NameError: name 'height' is not defined
?甚至当我将参数传递给Rectangle类的构造函数时?
class Rectangle(object):
class Point(object):
def __init__(self, x, y):
self.x=x
self.y=y
def getx(self):
return self.x
def gety(self):
return self.y
def __init__(self, height, width, point):
self.width=width
self.height=height
self.point=self.Point(point[0],point[1])