adorn.unit.value module
Representation of instances, specifically None and typing.Any
- class adorn.unit.value.Nny
Bases:
adorn.unit.value.ValueRepresentation of python’s
typing.Any
- class adorn.unit.value.Rone
Bases:
adorn.unit.value.ValueRepresentation of python’s NoneType, aka
None- class NoneType
Bases:
object
- class adorn.unit.value.Value
Bases:
adorn.unit.simple.SimpleUnitthat holds instancesThis class exists to handle
None, which is allowed to be used as a type and a value, as well astyping.Any.- contains(obj, orchestrator)
Check if the type or instance is part of
Value- Parameters
obj (Any) – the type or instance that may be part of
Valueorchestrator (Orchestrator) – container of all types, typically unused
- Returns
if
True, the type or instance is contained inValue- Return type
bool
- get(key, orchestrator)
Return the relevant type that represents a value
- Parameters
key (Any) – the type or instance that may be part of
Valueorchestrator (Orchestrator) – container of all types, typically unused
- Returns
- if
keyis represented byValue, then the type that is meant to represent an instance will be returned, otherwise
None
- if
- Return type
Optional[Type]