diff options
Diffstat (limited to 'scalarfloat.py')
-rw-r--r-- | scalarfloat.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scalarfloat.py b/scalarfloat.py index 83e0125..65a1a28 100644 --- a/scalarfloat.py +++ b/scalarfloat.py @@ -76,8 +76,8 @@ class ScalarFloat(float): def dump(self, out=sys.stdout): # type: (Any) -> Any - print( - 'ScalarFloat({}| w:{}, p:{}, s:{}, lz:{}|{}, w:{}, s:{})'.format( + out.write( + 'ScalarFloat({}| w:{}, p:{}, s:{}, lz:{}|{}, w:{}, s:{})\n'.format( self, self._width, # type: ignore self._prec, # type: ignore @@ -86,8 +86,7 @@ class ScalarFloat(float): self._exp, # type: ignore self._e_width, # type: ignore self._e_sign, # type: ignore - ), - file=out, + ) ) |