summaryrefslogtreecommitdiff
path: root/constructor.py
diff options
context:
space:
mode:
Diffstat (limited to 'constructor.py')
-rw-r--r--constructor.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/constructor.py b/constructor.py
index fb15eb6..99d3295 100644
--- a/constructor.py
+++ b/constructor.py
@@ -1162,7 +1162,7 @@ class RoundTripConstructor(SafeConstructor):
anchor=node.anchor,
)
width = len(value_so)
- prec = value_so.index('.') # you can use index, this would not be float without dot
+ prec = value_so.find('.') # you can't use index, !!float 42 would be a float without a dot
lead0 = leading_zeros(value_so)
return ScalarFloat(
sign * float(value_s),