Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Lib/sre_compile.py

    r2 r391  
    2424def _identityfunction(x):
    2525    return x
    26 
    27 def set(seq):
    28     s = {}
    29     for elem in seq:
    30         s[elem] = 1
    31     return s
    3226
    3327_LITERAL_CODES = set([LITERAL, NOT_LITERAL])
     
    350344        code = 'I'
    351345    # Convert block indices to byte array of 256 bytes
    352     mapping = array.array('b', mapping).tostring()
     346    mapping = array.array('B', mapping).tostring()
    353347    # Convert byte array to word array
    354348    mapping = array.array(code, mapping)
     
    361355    # check if av is a "simple" operator
    362356    lo, hi = av[2].getwidth()
    363     if lo == 0 and hi == MAXREPEAT:
    364         raise error, "nothing to repeat"
    365357    return lo == hi == 1 and av[2][0][0] != SUBPATTERN
    366358
Note: See TracChangeset for help on using the changeset viewer.