Changeset 260


Ignore:
Timestamp:
11/17/07 19:47:32 (7 years ago)
Author:
xi
Message:

A single dot is not a float value (fixes #62).

Location:
pyyaml/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/lib/yaml/resolver.py

    r246 r260  
    174174Resolver.add_implicit_resolver( 
    175175        u'tag:yaml.org,2002:float', 
    176         re.compile(ur'''^(?:[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*(?:[eE][-+][0-9]+)? 
     176        re.compile(ur'''^(?:[-+]?(?:[0-9][0-9_]*)\.[0-9_]*(?:[eE][-+][0-9]+)? 
     177                    |\.[0-9_]+(?:[eE][-+][0-9]+)? 
    177178                    |[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]* 
    178179                    |[-+]?\.(?:inf|Inf|INF) 
  • pyyaml/trunk/tests/test_errors.py

    r258 r260  
    1818 
    1919    def _testLoaderSingleErrors(self, test_name, invalid_filename): 
    20         self._load_single(invalid_filename) 
     20        #self._load_single(invalid_filename) 
    2121        self.failUnlessRaises(YAMLError, lambda: self._load_single(invalid_filename)) 
    2222 
Note: See TracChangeset for help on using the changeset viewer.