to_bool方法

to_bool(self)

以布尔值形式返回属性值。


def to_bool(self):
    ...

注意事项

如果属性类型不是 PropertyType.Boolean,则会引发异常。

也可以看看