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/Tools/unicode/gencodec.py

    r2 r391  
    4141                   '(#.+)?')
    4242
    43 def parsecodes(codes,
    44                len=len, filter=filter,range=range):
     43def parsecodes(codes, len=len, range=range):
    4544
    4645    """ Converts code combinations to either a single code integer
     
    6362        except ValueError:
    6463            l[i] = None
    65     l = filter(lambda x: x is not None, l)
     64    l = [x for x in l if x is not None]
    6665    if len(l) == 1:
    6766        return l[0]
     
    139138    l = []
    140139    append = l.append
    141     if map.has_key("IDENTITY"):
     140    if "IDENTITY" in map:
    142141        append("%s = codecs.make_identity_dict(range(%d))" %
    143142               (varname, map["IDENTITY"]))
     
    151150        identity = 0
    152151
    153     mappings = map.items()
    154     mappings.sort()
     152    mappings = sorted(map.items())
    155153    i = 0
    156154    key_precision, value_precision = precisions
     
    200198
    201199    # Analyze map and create table dict
    202     mappings = map.items()
    203     mappings.sort()
     200    mappings = sorted(map.items())
    204201    table = {}
    205202    maxkey = 0
    206     if map.has_key('IDENTITY'):
     203    if 'IDENTITY' in map:
    207204        for key in range(256):
    208205            table[key] = (key, '')
     
    422419    import sys
    423420    if 1:
    424         apply(convertdir,tuple(sys.argv[1:]))
    425     else:
    426         apply(rewritepythondir,tuple(sys.argv[1:]))
     421        convertdir(*sys.argv[1:])
     422    else:
     423        rewritepythondir(*sys.argv[1:])
Note: See TracChangeset for help on using the changeset viewer.