Skip to main content

conset

A wrapper around typing.Set that allows for additional constraints.

def conset(
item_type: type[HashableItemType],
min_length: int | None = None,
max_length: int | None = None
) - > type[set[HashableItemType]]

A wrapper around typing.Set that allows for additional constraints.

Parameters

NameTypeDescription
item_typetype[HashableItemType]The type of the items in the set.
min_length`intNone` = None
max_length`intNone` = None

Returns

TypeDescription
type[set[HashableItemType]]The wrapped set type.