summaryrefslogtreecommitdiff
path: root/representer.py
diff options
context:
space:
mode:
authorRolf Wojtech <rolf@wojtech.de>2018-03-21 16:37:39 +0100
committerRolf Wojtech <rolf@wojtech.de>2018-03-21 16:37:39 +0100
commit66b44b72d4be2a975c45d1d84bec80b10e3184da (patch)
tree65771d2bb573ed20a6f545dbb23fb3d6581a1e8c /representer.py
parent0bda7fa8499b6c802d6246435524b839e9a8ba4c (diff)
downloadruamel.yaml-66b44b72d4be2a975c45d1d84bec80b10e3184da.tar.gz
Attempted fix for scientic notation parsing
Diffstat (limited to 'representer.py')
-rw-r--r--representer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/representer.py b/representer.py
index 25e53b9..9163637 100644
--- a/representer.py
+++ b/representer.py
@@ -782,7 +782,7 @@ class RoundTripRepresenter(SafeRepresenter):
value += u'0'
else:
# exponent
- m, es = u'{:{}e}'.format(data, data._width).split('e')
+ m, es = u'{:{}.{}e}'.format(data, data._width, data._width - data._prec).split('e')
w = data._width if data._prec > 0 else (data._width + 1)
if data < 0:
w += 1