Changeset 25

Show
Ignore:
Timestamp:
01/19/08 06:09:29 (2 years ago)
Author:
erik
Message:

Added >>> for the benefit of the doctests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Scripts/Contributed/FontLabTokenize.py

    r24 r25  
    77lossless reverse function. Sample usage (and actual test suite): 
    88 
    9 tokenize('/A/B/C') 
     9>>> tokenize('/A/B/C') 
    1010['/A', '/B', '/C'] 
    11 tokenize('abcde/B/C') 
     11>>> tokenize('abcde/B/C') 
    1212['a', 'b', 'c', 'd', 'e', '/B', '/C'] 
    13 tokenize('foo/A.smcp/B.smcp abc') 
     13>>> tokenize('foo/A.smcp/B.smcp abc') 
    1414['f', 'o', 'o', '/A.smcp', '/B.smcp', 'a', 'b', 'c'] 
    15 p = ['f', 'o', 'o', '/A.smcp', '/B.smcp', 'a', 'b', 'c'] 
    16 serialize(p) 
     15>>> p = ['f', 'o', 'o', '/A.smcp', '/B.smcp', 'a', 'b', 'c'] 
     16>>> serialize(p) 
    1717'foo/A.smcp/B.smcp abc' 
    18 tokenize('/a /b /c') 
     18>>> tokenize('/a /b /c') 
    1919['/a', '/b', '/c'] 
    20 tokenize('/a/b c') 
     20>>> tokenize('/a/b c') 
    2121['/a', '/b', 'c'] 
    22 tokenize('@a@b@') 
     22>>> tokenize('@a@b@') 
    2323['@', 'a', '@', 'b', '@'] 
    24 tokenize('abc def ghi ') 
     24>>> tokenize('abc def ghi ') 
    2525['a', 'b', 'c', ' ', 'd', 'e', 'f', ' ', 'g', 'h', 'i', ' '] 
    26 p = ['a', 'b', 'c', ' ', 'd', 'e', 'f', ' ', 'g', 'h', 'i', ' '] 
    27 serialize(p) 
     26>>> p = ['a', 'b', 'c', ' ', 'd', 'e', 'f', ' ', 'g', 'h', 'i', ' '] 
     27>>> serialize(p) 
    2828'abc def ghi ' 
    29 serialize(['/a', 'b', '/c', 'd']) 
     29>>> serialize(['/a', 'b', '/c', 'd']) 
    3030'/a b/c d' 
    3131"""