我收到错误"调用Python对象时超出了最大递归深度"。
我的目标如下:
import numpy as np
class BoundingBox(object):
def __init__(self):
super(BoundingBox, self).__init__()
self.topLeft = np.matrix([0, 0])
self.topRight = np.matrix([0, 0])
self.bottomLeft = np.matrix([0, 0])
self.bottomRight = np.matrix([0, 0])
@property
def topLeft(self):
return self._topLeft
@topLeft.setter
def topLeft(self, value):
self._topLeft = value
@property
def topRight(self):
return self._topRight
@topRight.setter
def topRight(self, value):
self._topRight = value
@property
def bottomLeft(self):
return self._bottomLeft
@bottomLeft.setter
def bottomLeft(self, value):
self._bottomLeft = value
@property
def bottomRight(self):
return self._bottomRight
@bottomRight.setter
def bottomRight(self, value):
self._bottomRight = value
似乎这个问题来自制定者,但我不明白为什么。
答案 0 :(得分:0)
I restart my IDE (PyCharm) and it does work... I don't know why.