mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-07-01 17:29:27 +02:00
repr and str exchanged
This commit is contained in:
parent
62fe1f9e3a
commit
be4d9f722e
2 changed files with 5 additions and 5 deletions
|
@ -473,6 +473,9 @@ class Obs:
|
|||
pickle.dump(self, fb)
|
||||
|
||||
def __repr__(self):
|
||||
return 'Obs[' + str(self) + ']'
|
||||
|
||||
def __str__(self):
|
||||
if self.dvalue == 0.0:
|
||||
return str(self.value)
|
||||
fexp = np.floor(np.log10(self.dvalue))
|
||||
|
@ -483,9 +486,6 @@ class Obs:
|
|||
else:
|
||||
return '{:.0f}({:2.0f})'.format(self.value, self.dvalue)
|
||||
|
||||
def __str__(self):
|
||||
return 'Obs[' + self.__repr__() + ']'
|
||||
|
||||
# Overload comparisons
|
||||
def __lt__(self, other):
|
||||
return self.value < other
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue