mirror of
https://github.com/python/cpython.git
synced 2025-09-16 05:36:29 +00:00
replace has_key with 'in' operator
This commit is contained in:
parent
de0559998f
commit
6e3dbbdf39
29 changed files with 71 additions and 71 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue