Mercurial > cpython-lru_cache-weakref
diff Lib/lib-tk/FileDialog.py @ 56436:684960fb1cbf legacy-trunk
replace has_key with 'in' operator
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Fri, 09 Oct 2009 22:15:50 +0000 |
| parents | 5cec436d64a2 |
| children |
line wrap: on
line diff
--- a/Lib/lib-tk/FileDialog.py Fri Oct 09 22:05:45 2009 +0000 +++ b/Lib/lib-tk/FileDialog.py Fri Oct 09 22:15:50 2009 +0000 @@ -107,7 +107,7 @@ 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)
