float special method added to pyerrors

This commit is contained in:
Fabian Joswig 2021-10-16 11:41:44 +01:00
parent be4d9f722e
commit dc4514e8d0

View file

@ -472,6 +472,9 @@ class Obs:
with open(file_name, 'wb') as fb:
pickle.dump(self, fb)
def __float__(self):
return self.value
def __repr__(self):
return 'Obs[' + str(self) + ']'