summaryrefslogtreecommitdiff
path: root/resolver.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-08-30 21:00:09 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-08-30 21:00:09 +0200
commit209ce7fbd33c12263980c6c1468d36d0ffbf8ea7 (patch)
treefd887c93272fa43143cc16bbe449b7244bcc5c37 /resolver.py
parent95e1aa1d1226e148ed9b43ed714635c32d8d455b (diff)
downloadruamel.yaml-209ce7fbd33c12263980c6c1468d36d0ffbf8ea7.tar.gz
fix issue #229 enable round-trip of floats without number before the dot
[ .5, -.5, +.5 ] should work *When this change indeed resolves your problem, please **Close** this issue*. *(You can do so using the WorkFlow pull-down (close to the top right of this page))*
Diffstat (limited to 'resolver.py')
-rw-r--r--resolver.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/resolver.py b/resolver.py
index bada11e..2641a54 100644
--- a/resolver.py
+++ b/resolver.py
@@ -38,7 +38,7 @@ implicit_resolvers = [
RegExp(u'''^(?:
[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+]?[0-9]+)?
|[-+]?(?:[0-9][0-9_]*)(?:[eE][-+]?[0-9]+)
- |\\.[0-9_]+(?:[eE][-+][0-9]+)?
+ |[-+]?\\.[0-9_]+(?:[eE][-+][0-9]+)?
|[-+]?\\.(?:inf|Inf|INF)
|\\.(?:nan|NaN|NAN))$''', re.X),
list(u'-+0123456789.')),