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/plat-mac/aetools.py

    r2 r391  
    111111    ok = keydict.values()
    112112    for k in arguments.keys():
    113         if keydict.has_key(k):
     113        if k in keydict:
    114114            v = arguments[k]
    115115            del arguments[k]
     
    120120def enumsubst(arguments, key, edict):
    121121    """Substitute a single enum keyword argument, if it occurs"""
    122     if not arguments.has_key(key) or edict is None:
     122    if key not in arguments or edict is None:
    123123        return
    124124    v = arguments[key]
    125125    ok = edict.values()
    126     if edict.has_key(v):
     126    if v in edict:
    127127        arguments[key] = Enum(edict[v])
    128128    elif not v in ok:
     
    133133    errn = arguments['errn']
    134134    err_a1 = errn
    135     if arguments.has_key('errs'):
     135    if 'errs' in arguments:
    136136        err_a2 = arguments['errs']
    137137    else:
    138138        err_a2 = MacOS.GetErrorString(errn)
    139     if arguments.has_key('erob'):
     139    if 'erob' in arguments:
    140140        err_a3 = arguments['erob']
    141141    else:
     
    252252        _reply, _arguments, _attributes = self.send(_code, _subcode,
    253253                _arguments, _attributes)
    254         if _arguments.has_key('errn'):
     254        if 'errn' in _arguments:
    255255            raise Error, decodeerror(_arguments)
    256256
    257         if _arguments.has_key('----'):
     257        if '----' in _arguments:
    258258            return _arguments['----']
    259259            if asfile:
     
    285285            raise Error, decodeerror(_arguments)
    286286        # XXXX Optionally decode result
    287         if _arguments.has_key('----'):
     287        if '----' in _arguments:
    288288            return _arguments['----']
    289289
     
    294294
    295295    def __getattr__(self, name):
    296         if self._elemdict.has_key(name):
     296        if name in self._elemdict:
    297297            cls = self._elemdict[name]
    298298            return DelayedComponentItem(cls, None)
    299         if self._propdict.has_key(name):
     299        if name in self._propdict:
    300300            cls = self._propdict[name]
    301301            return cls()
     
    319319        _reply, _arguments, _attributes = self.send(_code, _subcode,
    320320                _arguments, _attributes)
    321         if _arguments.has_key('errn'):
     321        if 'errn' in _arguments:
    322322            raise Error, decodeerror(_arguments)
    323323        # XXXX Optionally decode result
    324         if _arguments.has_key('----'):
     324        if '----' in _arguments:
    325325            return _arguments['----']
    326326#pass
Note: See TracChangeset for help on using the changeset viewer.