Changeset 59


Ignore:
Timestamp:
02/25/06 15:13:09 (8 years ago)
Author:
xi
Message:

Remove y/n from the boolean constants.

Location:
branches/pyyaml3000
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • branches/pyyaml3000/Makefile

    r48 r59  
    11 
    2 .PHONY: default build force install test clean 
     2.PHONY: default build force install test dist-src clean 
    33 
    44PYTHON=/usr/bin/python 
     
    1818        ${PYTHON} tests/test_build.py ${TEST} 
    1919 
     20dist-src: 
     21        ${PYTHON} setup.py sdist --formats=zip,gztar 
     22 
    2023clean: 
    2124        ${PYTHON} setup.py clean -a 
  • branches/pyyaml3000/lib/yaml/constructor.py

    r58 r59  
    162162 
    163163    bool_values = { 
    164         u'y':       True, 
    165164        u'yes':     True, 
    166         u'n':       False, 
    167165        u'no':      False, 
    168166        u'true':    True, 
  • branches/pyyaml3000/lib/yaml/resolver.py

    r57 r59  
    9494Resolver.add_detector( 
    9595        u'tag:yaml.org,2002:bool', 
    96         re.compile(ur'''^(?:y|Y|yes|Yes|YES|n|N|no|No|NO 
     96        re.compile(ur'''^(?:yes|Yes|YES|n|N|no|No|NO 
    9797                    |true|True|TRUE|false|False|FALSE 
    9898                    |on|On|ON|off|Off|OFF)$''', re.X), 
  • branches/pyyaml3000/setup.py

    r39 r59  
    22NAME = 'PyYAML3000' 
    33VERSION = '0.1' 
    4 DESCRIPTION = "YAML parser (and emitter)" 
     4DESCRIPTION = "The next generation YAML parser for Python" 
    55AUTHOR = "Kirill Simonov" 
    66AUTHOR_EMAIL = 'xi@resolvent.net' 
    7 LICENSE = "BSD" 
     7LICENSE = "MIT" 
    88 
    99from distutils.core import setup 
  • branches/pyyaml3000/tests/data/bool.data

    r55 r59  
    1 - y 
     1- yes 
    22- NO 
    33- True 
  • branches/pyyaml3000/tests/data/construct-bool.data

    r58 r59  
    1 canonical: y 
     1canonical: yes 
    22answer: NO 
    33logical: True 
  • branches/pyyaml3000/tests/test_constructor.py

    r58 r59  
    55except ImportError: 
    66    pass 
     7try: 
     8    set 
     9except NameError: 
     10    from sets import Set as set 
    711 
    812from yaml import * 
  • branches/pyyaml3000/tests/test_errors.py

    r58 r59  
    2727        #except ParserError, exc: 
    2828        #except ComposerError, exc: 
     29        #except ConstructorError, exc: 
    2930            #print '.'*70 
    3031            #print "%s:" % exc.__class__.__name__, exc 
     
    4041            constructor = Constructor(resolver) 
    4142            return list(constructor) 
    42         #except YAMLError, exc: 
     43        except YAMLError, exc: 
    4344        #except ScannerError, exc: 
    4445        #except ParserError, exc: 
    4546        #except ComposerError, exc: 
    46         except ConstructorError, exc: 
    47             print '.'*70 
    48             print "%s:" % filename 
    49             print "%s:" % exc.__class__.__name__, exc 
     47        #except ConstructorError, exc: 
     48            #print '.'*70 
     49            #print "%s:" % filename 
     50            #print "%s:" % exc.__class__.__name__, exc 
    5051            raise 
    5152 
Note: See TracChangeset for help on using the changeset viewer.