diff options
| author | Benjamin Peterson <benjamin@python.org> | 2009-10-09 22:15:50 (GMT) | 
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2009-10-09 22:15:50 (GMT) | 
| commit | 6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc (patch) | |
| tree | 09bb1d277d25af8ed32f042ff8fce5549105bc76 /Lib/idlelib/configDialog.py | |
| parent | de0559998fef231efc9ecbdef5b3a195d4eaa28d (diff) | |
| download | cpython-6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc.zip cpython-6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc.tar.gz cpython-6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc.tar.bz2  | |
replace has_key with 'in' operator
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 2f199a0..80c54b6 100644 --- a/Lib/idlelib/configDialog.py +++ b/Lib/idlelib/configDialog.py @@ -562,7 +562,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 @@ -709,7 +709,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() @@ -736,7 +736,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() @@ -871,9 +871,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()  | 
