sob.types
NULL
module-attribute
sob.NULL
is the singleton instance of sob.Null
, and is used to represent
an explicit null
value in JSON, whereas in the context of an instance
of a sub-class of sob.Object
—None
indicates the absence of a property
value.
UNDEFINED
module-attribute
sob.UNDEFINED
is the singleton instance of sob.Undefined
, and is used to
indicate that a parameter has not been passed to a function or method keyword.
Null
Null()
Instances of this class represent an explicit null value, rather than the
absence of a property/attribute/element, as would be inferred from a value
of None
.
Note: Like the built-in value None
, only one instance of this class is
permitted (it's a singleton), so this class should never be instantiated,
it should always be referenced through the constant sob.NULL
.
Source code in src/sob/_types.py
90 91 92 93 |
|
Undefined
Undefined()
This class is intended to indicate that a parameter has not been passed
to a keyword argument in situations where None
is to be used as a
meaningful value.
The Undefined
class is a singleton, so only one instance of this class
is permitted: sob.UNDEFINED
.
Source code in src/sob/_types.py
24 25 26 27 28 29 |
|
Types
Types(
items: (
sob.abc.Types
| collections.abc.Iterable[type | sob.abc.Property]
| type
| sob.abc.Property
| None
) = None,
)
Instances of this class are immutable lists of types and/or property definitions.
Source code in src/sob/types.py
34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
MutableTypes
MutableTypes(
items: (
sob.abc.Types
| collections.abc.Iterable[type | sob.abc.Property]
| type
| sob.abc.Property
| None
) = None,
)
Bases: sob.types.Types
, sob.abc.MutableTypes
Instances of this class are (mutable) lists of types and/or property definitions.
Source code in src/sob/types.py
34 35 36 37 38 39 40 41 42 43 44 45 46 |
|