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/scanner.py

    r222 r328  
    808808        length = 0 
    809809        ch = self.peek(length) 
    810         while u'0' <= ch <= u'9' or u'A' <= ch <= 'Z' or u'a' <= ch <= 'z'  \ 
     810        while u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z'    \ 
    811811                or ch in u'-_': 
    812812            length += 1 
     
    847847        # See the specification for details. 
    848848        ch = self.peek() 
    849         if not (u'0' <= ch <= '9'): 
     849        if not (u'0' <= ch <= u'9'): 
    850850            raise ScannerError("while scanning a directive", start_mark, 
    851851                    "expected a digit, but found %r" % ch.encode('utf-8'), 
     
    913913        start_mark = self.get_mark() 
    914914        indicator = self.peek() 
    915         if indicator == '*': 
     915        if indicator == u'*': 
    916916            name = 'alias' 
    917917        else: 
     
    920920        length = 0 
    921921        ch = self.peek(length) 
    922         while u'0' <= ch <= u'9' or u'A' <= ch <= 'Z' or u'a' <= ch <= 'z'  \ 
     922        while u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z'    \ 
    923923                or ch in u'-_': 
    924924            length += 1 
     
    13691369        ch = self.peek(length) 
    13701370        if ch != u' ': 
    1371             while u'0' <= ch <= u'9' or u'A' <= ch <= 'Z' or u'a' <= ch <= 'z'  \ 
     1371            while u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z'    \ 
    13721372                    or ch in u'-_': 
    13731373                length += 1 
     
    13891389        length = 0 
    13901390        ch = self.peek(length) 
    1391         while u'0' <= ch <= u'9' or u'A' <= ch <= 'Z' or u'a' <= ch <= 'z'  \ 
     1391        while u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z'    \ 
    13921392                or ch in u'-;/?:@&=+$,_.!~*\'()[]%': 
    13931393            if ch == u'%': 
Note: See TracChangeset for help on using the changeset viewer.