diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-20 16:25:10 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-20 16:25:10 (GMT) |
commit | f1a69c16665c6c031c4723e5bc3e6d6f4118fa5e (patch) | |
tree | cf6ab6722fd4419721519ab7cf5f02d1d981a359 /Lib/plat-mac/MiniAEFrame.py | |
parent | 0da7e03e12abd760085bd7e76df617d69fd94822 (diff) | |
download | cpython-f1a69c16665c6c031c4723e5bc3e6d6f4118fa5e.zip cpython-f1a69c16665c6c031c4723e5bc3e6d6f4118fa5e.tar.gz cpython-f1a69c16665c6c031c4723e5bc3e6d6f4118fa5e.tar.bz2 |
Get rid of a bunch more has_key() uses. We *really* need a tool for this.
test_aepack now passes. IDLE still needs to be converted (among others).
Diffstat (limited to 'Lib/plat-mac/MiniAEFrame.py')
-rw-r--r-- | Lib/plat-mac/MiniAEFrame.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/plat-mac/MiniAEFrame.py b/Lib/plat-mac/MiniAEFrame.py index 98247cb..569cd7b 100644 --- a/Lib/plat-mac/MiniAEFrame.py +++ b/Lib/plat-mac/MiniAEFrame.py @@ -134,11 +134,11 @@ class AEServer: _class = _attributes['evcl'].type _type = _attributes['evid'].type - if self.ae_handlers.has_key((_class, _type)): + if (_class, _type) in self.ae_handlers: _function = self.ae_handlers[(_class, _type)] - elif self.ae_handlers.has_key((_class, '****')): + elif (_class, '****') in self.ae_handlers: _function = self.ae_handlers[(_class, '****')] - elif self.ae_handlers.has_key(('****', '****')): + elif ('****', '****') in self.ae_handlers: _function = self.ae_handlers[('****', '****')] else: raise 'Cannot happen: AE callback without handler', (_class, _type) @@ -148,7 +148,7 @@ class AEServer: _parameters['_attributes'] = _attributes _parameters['_class'] = _class _parameters['_type'] = _type - if _parameters.has_key('----'): + if '----' in _parameters: _object = _parameters['----'] del _parameters['----'] # The try/except that used to be here can mask programmer errors. |