Changeset 391 for python/trunk/Lib/sre_compile.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/sre_compile.py
r2 r391 24 24 def _identityfunction(x): 25 25 return x 26 27 def set(seq):28 s = {}29 for elem in seq:30 s[elem] = 131 return s32 26 33 27 _LITERAL_CODES = set([LITERAL, NOT_LITERAL]) … … 350 344 code = 'I' 351 345 # Convert block indices to byte array of 256 bytes 352 mapping = array.array(' b', mapping).tostring()346 mapping = array.array('B', mapping).tostring() 353 347 # Convert byte array to word array 354 348 mapping = array.array(code, mapping) … … 361 355 # check if av is a "simple" operator 362 356 lo, hi = av[2].getwidth() 363 if lo == 0 and hi == MAXREPEAT:364 raise error, "nothing to repeat"365 357 return lo == hi == 1 and av[2][0][0] != SUBPATTERN 366 358
Note:
See TracChangeset
for help on using the changeset viewer.