replace has_key with 'in' operator

This commit is contained in:
Benjamin Peterson 2009-10-09 22:15:50 +00:00
parent de0559998f
commit 6e3dbbdf39
29 changed files with 71 additions and 71 deletions

View file

@ -705,8 +705,8 @@ class EditorWindow(object):
if accel:
itemName = menu.entrycget(index, 'label')
event = ''
if menuEventDict.has_key(menubarItem):
if menuEventDict[menubarItem].has_key(itemName):
if menubarItem in menuEventDict:
if itemName in menuEventDict[menubarItem]:
event = menuEventDict[menubarItem][itemName]
if event:
accel = get_accelerator(keydefs, event)