adorn.unit.value module

Representation of instances, specifically None and typing.Any

class adorn.unit.value.Nny

Bases: adorn.unit.value.Value

Representation of python’s typing.Any

class adorn.unit.value.Rone

Bases: adorn.unit.value.Value

Representation of python’s NoneType, aka None

class NoneType

Bases: object

class adorn.unit.value.Value

Bases: adorn.unit.simple.Simple

Unit that holds instances

This class exists to handle None, which is allowed to be used as a type and a value, as well as typing.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 Value

  • orchestrator (Orchestrator) – container of all types, typically unused

Returns

if True, the type or instance is contained in Value

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 Value

  • orchestrator (Orchestrator) – container of all types, typically unused

Returns

if key is represented by Value,

then the type that is meant to represent an instance will be returned, otherwise None

Return type

Optional[Type]