base#

Base class for input/output domains.

Classes#

Domain

Base class for input/output domains.

class Domain#

Bases: abc.ABC

Base class for input/output domains.

property carrier_type(self)#

Returns the type of elements in the domain.

Return type

type

validate(self, value)#

Raises an error if value is not in the domain.

Parameters

value (Any) –

__contains__(self, value)#

Returns True if value is in the domain.

Parameters

value (Any) –

Return type

bool

Exceptions#

exception OutOfDomainError#

Bases: Exception

Exception type that indicates a validation error in a Domain.