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

@ -107,7 +107,7 @@ class FileDialog:
self.top.bind('<Alt-W>', self.cancel_command)
def go(self, dir_or_file=os.curdir, pattern="*", default="", key=None):
if key and dialogstates.has_key(key):
if key and key in dialogstates:
self.directory, pattern = dialogstates[key]
else:
dir_or_file = os.path.expanduser(dir_or_file)