add correct IntegerDNA.__repr__()
@@ -372,6 +372,9 @@ class IntegerDNA(DNA):
def is_valid(self) -> bool:
return all(0 <= v < self._max for v in self._data)
+ def __repr__(self):
+ return f"{self.__class__.__name__}({str(self._data)}, {self._max})"
+
def __str__(self):
if self.fitness is None:
fitness = ", fitness=None"
