小编Ant*_*ujo的帖子

何时使用'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
Run Code Online (Sandbox Code Playgroud)

python oop

54
推荐指数
4
解决办法
8万
查看次数

标签 统计

oop ×1

python ×1