难道要记住自己和你的团队正确实施课程吗? 我不完全得到使用抽象类是这样的:何时使用'raise NotImplementedError'?
class RectangularRoom(object):
def __init__(self, width, height):
raise NotImplementedError
def cleanTileAtPosition(self, pos):
raise NotImplementedError
def isTileCleaned(self, m, n):
raise NotImplementedError
跨网站欺骗:https://softwareengineering.stackexchange.com/q/231397/110531 – jonrsharpe
我会说:当它满足[“最小惊讶的原则”](https://en.wikipedia.org /维基/ Principle_of_least_astonishment)。 – MSeifert