AbstractAttrs
类数据类源码
AbstractAttrs(
properties: list[property | cached_property] = [],
methods: list[function | classmethod | staticmethod] = [],
operators: dict[str, function] = dict(...)
)
该实例用于临时存放类的抽象成员。
当临时类摘要附带抽象类属性时,该集合将会启用。
字段
| 字段 | 类型 | 必选 | |
|---|---|---|---|
properties | list[property | cached_property] | 用来保存类的所有抽象属性。 | |
methods | list[function | classmethod | staticmethod] | 用来保存类的所有抽象方法,包括实例、类、和静态方法。 | |
operators | dict[str, function] | 用来保存类的所有抽象运算符重载。 |
属性
is_not_implemented
is_not_implemented: bool = self.is_not_implemented
布尔标记。如果为True,则对应的抽象类型仍然有着没有实现的方法(成员)。