diff options
author | Guido van Rossum <guido@python.org> | 2006-08-22 15:45:46 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2006-08-22 15:45:46 (GMT) |
commit | 811c4e0b7cb1a3b43cda8dab0b1587983b44c58d (patch) | |
tree | 6d1172a99c68bba0391eb165c2ddcc75315b56ad /Lib/idlelib/configDialog.py | |
parent | d204a715f4776fc2e5498e81c9e7a647e902b682 (diff) | |
download | cpython-811c4e0b7cb1a3b43cda8dab0b1587983b44c58d.zip cpython-811c4e0b7cb1a3b43cda8dab0b1587983b44c58d.tar.gz cpython-811c4e0b7cb1a3b43cda8dab0b1587983b44c58d.tar.bz2 |
Remove has_key() references from idlelib. IDLE still doesn't run due
to relative import issues. Any volunteers?
Diffstat (limited to 'Lib/idlelib/configDialog.py')
-rw-r--r-- | Lib/idlelib/configDialog.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py index 2d8835c..c1cbf82 100644 --- a/Lib/idlelib/configDialog.py +++ b/Lib/idlelib/configDialog.py @@ -550,7 +550,7 @@ class ConfigDialog(Toplevel): def AddChangedItem(self,type,section,item,value): value=str(value) #make sure we use a string - if not self.changedItems[type].has_key(section): + if section not in self.changedItems[type]: self.changedItems[type][section]={} self.changedItems[type][section][item]=value @@ -697,7 +697,7 @@ class ConfigDialog(Toplevel): return #remove key set from config idleConf.userCfg['keys'].remove_section(keySetName) - if self.changedItems['keys'].has_key(keySetName): + if keySetName in self.changedItems['keys']: del(self.changedItems['keys'][keySetName]) #write changes idleConf.userCfg['keys'].Save() @@ -724,7 +724,7 @@ class ConfigDialog(Toplevel): return #remove theme from config idleConf.userCfg['highlight'].remove_section(themeName) - if self.changedItems['highlight'].has_key(themeName): + if themeName in self.changedItems['highlight']: del(self.changedItems['highlight'][themeName]) #write changes idleConf.userCfg['highlight'].Save() @@ -859,9 +859,9 @@ class ConfigDialog(Toplevel): #handle any unsaved changes to this theme if theme in self.changedItems['highlight'].keys(): themeDict=self.changedItems['highlight'][theme] - if themeDict.has_key(element+'-foreground'): + if element+'-foreground' in themeDict: colours['foreground']=themeDict[element+'-foreground'] - if themeDict.has_key(element+'-background'): + if element+'-background' in themeDict: colours['background']=themeDict[element+'-background'] self.textHighlightSample.tag_config(element, **colours) self.SetColourSample() |