Ignore:
Timestamp:
12/29/08 12:24:05 (5 years ago)
Author:
xi
Message:

Added basic support for Python 3 (Thanks idadesub(at)users(dot)sourceforge(dot)net).

File:
1 edited

Legend:

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

    r313 r328  
    546546                    % (handle.encode('utf-8'))) 
    547547        for ch in handle[1:-1]: 
    548             if not (u'0' <= ch <= u'9' or u'A' <= ch <= 'Z' or u'a' <= ch <= 'z'    \ 
     548            if not (u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z'  \ 
    549549                    or ch in u'-_'): 
    550550                raise EmitterError("invalid character %r in the tag handle: %r" 
     
    561561        while end < len(prefix): 
    562562            ch = prefix[end] 
    563             if u'0' <= ch <= u'9' or u'A' <= ch <= 'Z' or u'a' <= ch <= 'z'  \ 
     563            if u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z'   \ 
    564564                    or ch in u'-;/?!:@&=+$,_.~*\'()[]': 
    565565                end += 1 
     
    591591        while end < len(suffix): 
    592592            ch = suffix[end] 
    593             if u'0' <= ch <= u'9' or u'A' <= ch <= 'Z' or u'a' <= ch <= 'z'  \ 
     593            if u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z'   \ 
    594594                    or ch in u'-;/?:@&=+$,_.~*\'()[]'   \ 
    595595                    or (ch == u'!' and handle != u'!'): 
     
    614614            raise EmitterError("anchor must not be empty") 
    615615        for ch in anchor: 
    616             if not (u'0' <= ch <= u'9' or u'A' <= ch <= 'Z' or u'a' <= ch <= 'z'    \ 
     616            if not (u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z'  \ 
    617617                    or ch in u'-_'): 
    618618                raise EmitterError("invalid character %r in the anchor: %r" 
Note: See TracChangeset for help on using the changeset viewer.