summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk/Tix.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib-tk/Tix.py')
-rwxr-xr-xLib/lib-tk/Tix.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/lib-tk/Tix.py b/Lib/lib-tk/Tix.py
index f1a1091..c81cc83 100755
--- a/Lib/lib-tk/Tix.py
+++ b/Lib/lib-tk/Tix.py
@@ -336,7 +336,7 @@ class TixWidget(Tkinter.Widget):
# We can even do w.ok.invoke() because w.ok is subclassed from the
# Button class if you go through the proper constructors
def __getattr__(self, name):
- if self.subwidget_list.has_key(name):
+ if name in self.subwidget_list:
return self.subwidget_list[name]
raise AttributeError, name
@@ -464,9 +464,9 @@ class TixSubWidget(TixWidget):
# also destroys the parent NoteBook thus leading to an exception
# in Tkinter when it finally calls Tcl to destroy the NoteBook
for c in self.children.values(): c.destroy()
- if self.master.children.has_key(self._name):
+ if self._name in self.master.children:
del self.master.children[self._name]
- if self.master.subwidget_list.has_key(self._name):
+ if self._name in self.master.subwidget_list:
del self.master.subwidget_list[self._name]
if self.destroy_physically:
# This is bypassed only for a few widgets
@@ -488,8 +488,8 @@ class DisplayStyle:
def __init__(self, itemtype, cnf={}, **kw):
master = _default_root # global from Tkinter
- if not master and cnf.has_key('refwindow'): master=cnf['refwindow']
- elif not master and kw.has_key('refwindow'): master= kw['refwindow']
+ if not master and 'refwindow' in cnf: master=cnf['refwindow']
+ elif not master and 'refwindow' in kw: master= kw['refwindow']
elif not master: raise RuntimeError, "Too early to create display style: no root window"
self.tk = master.tk
self.stylename = self.tk.call('tixDisplayStyle', itemtype,
@@ -571,7 +571,7 @@ class ButtonBox(TixWidget):
return btn
def invoke(self, name):
- if self.subwidget_list.has_key(name):
+ if name in self.subwidget_list:
self.tk.call(self._w, 'invoke', name)
class ComboBox(TixWidget):
@@ -1433,7 +1433,7 @@ class StdButtonBox(TixWidget):
self.subwidget_list['help'] = _dummyButton(self, 'help')
def invoke(self, name):
- if self.subwidget_list.has_key(name):
+ if name in self.subwidget_list:
self.tk.call(self._w, 'invoke', name)
class TList(TixWidget, XView, YView):