__repr__ provides a generic fallback for __str__ and, in the
case of IntegerFields the representation is both human readable
and unambiguous.
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
def __float__(self):
return float(self._value)
- def __str__(self):
- return str(self._value)
+ def __repr__(self):
+ return repr(self._value)
def __lt__(self, other):
if not isinstance(other, numbers.Number):