config.utils

杂项实用程序

在 0.2.0 版本加入.

Attributes

Unset

用于填充默认值的特殊值

Classes

FrozenArguments

存储冻结的参数的容器

Ref

间接持有对象引用的容器

UnsetType

用于填充默认值的特殊值

Functions

singleton(→ singleton.C)

单例模式类装饰器

Module Contents

class FrozenArguments(args: collections.abc.Sequence[Any] | None = None, kwargs: collections.abc.Mapping[str, Any] | None = None)

存储冻结的参数的容器

在 0.3.0 版本加入.

参数:
  • args (Sequence[Any]) -- 位置参数

  • kwargs (Mapping[str, Any]) -- 关键字参数

__eq__(other: Any) bool
__hash__() int
__iter__() collections.abc.Iterator[tuple[Any, Ellipsis] | collections.OrderedDict[str, Any]]
__or__(other: tuple[collections.abc.Sequence[Any], collections.abc.Mapping[str, Any]] | Self) Self | types.NotImplementedType
_args = ()
_kwargs: tuple[tuple[str, Any], Ellipsis] = ()
property args: tuple[Any, Ellipsis]

位置参数

返回:

位置参数

返回类型:

tuple[Any]

property kwargs: collections.OrderedDict[str, Any]

关键字参数

返回:

关键字参数

返回类型:

OrderedDict[str, Any]

class Ref(value: T)

间接持有对象引用的容器

在 0.3.0 版本发生变更: 重命名 CellTypeRef

重命名字段 cell_contentsvalue

参数:

value (T) -- 引用对象

__repr__() str
__slots__ = ('value',)
value
class UnsetType

用于填充默认值的特殊值

__bool__() bool
__str__() str
__slots__ = ()
singleton(target_cls: singleton.C, /) singleton.C

单例模式类装饰器

参数:

target_cls (C) -- 目标类

返回:

装饰后的类

返回类型:

C

Unset

用于填充默认值的特殊值