ParamSpecPool#
- class ParamSpecPool(*args, **kwargs)#
A ParamSpecPool
maintains a collection of ParamSpec
which can be
quickly accessed by owner and name.
The implementation of the Object
property system uses such a pool to
store the ParamSpec
of the properties all object types.
Methods#
- class ParamSpecPool
- free() None #
Frees the resources allocated by a
ParamSpecPool
.Added in version 2.80.
- insert(pspec: ParamSpec, owner_type: type) None #
Inserts a
ParamSpec
in the pool.- Parameters:
pspec – the
ParamSpec
to insertowner_type – a
Type
identifying the owner ofpspec
- list(owner_type: type) list[ParamSpec] #
Gets an array of all
ParamSpec
owned byowner_type
in the pool.- Parameters:
owner_type – the owner to look for
- list_owned(owner_type: type) list[ParamSpec] #
Gets an
GList
of allParamSpec
owned byowner_type
in the pool.- Parameters:
owner_type – the owner to look for
- lookup(param_name: str, owner_type: type, walk_ancestors: bool) ParamSpec | None #
Looks up a
ParamSpec
in the pool.- Parameters:
param_name – the name to look for
owner_type – the owner to look for
walk_ancestors – If
True
, also try to find aParamSpec
withparam_name
owned by an ancestor ofowner_type
.