From a354e4060e1d14709b9888d24f04c0e035ecdb24 Mon Sep 17 00:00:00 2001 From: xi Date: Sun, 21 May 2006 07:26:05 +0000 Subject: [PATCH] Fixed #15 (pyyaml discards '-' sign on negative floats). Thanks to alex_(a)_alexmole_(o)_co_(o)_uk for reporting the bug. git-svn-id: http://svn.pyyaml.org/pyyaml/trunk@170 18f92427-320e-0410-9341-c67f048884a3 --- lib/yaml/constructor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/yaml/constructor.py b/lib/yaml/constructor.py index d83c7d3..e35cca7 100644 --- a/lib/yaml/constructor.py +++ b/lib/yaml/constructor.py @@ -258,7 +258,7 @@ class SafeConstructor(BaseConstructor): base *= 60 return sign*value else: - return float(value) + return sign*float(value) def construct_yaml_binary(self, node): value = self.construct_scalar(node) -- 2.11.4.GIT