DuplicateValueError(value)
Source¶
Bases: NumdaplotError
Raised when a value is given twice where each value must be unique.
For example, the same old value in two ValueChange of a ValueMapping.
Added in version 0.1.0
Parameters:
-
value(object)The repeated value.
Attributes:
-
valueThe repeated value.
Examples:
import numdaplot as ndp
try:
ndp.ValueMapping(changes=[ndp.ValueChange(2, "Femme"), ndp.ValueChange(2, "F")])
except ndp.DuplicateValueError as error:
print(error)
# The value 2 appears more than once.