envprobe.vartypes.numeric.Numeric
- class Numeric(name, raw_value='0')
This type may only hold a numeric (
int
orfloat
) value.Create a new
Numeric
variable by converting raw_value.Methods
__init__
(name[, raw_value])Create a new
Numeric
variable by converting raw_value.apply_diff
(diff)Applies the given difference to the value of the instance.
diff
(old, new)Generate an iterable difference "actions" between two variables.
merge_diff
(diff_a, diff_b)Creates a merged diff from two diffs that simulates the transitive application of the first and the second diff in order.
raw
()Convert the value to raw shell representation, i.e. a
str
.type_description
()Contains a value that must be an integer or floating-point number.
Attributes
extended_attributes
Returns the object managing the extended attributes (user-facing knowledge) about the variable.
is_floating
Whether the value is of
float
type.is_integer
Whether the value is of
int
type.name
The name of the variable.
value
Get the value of the variable.