diff options
author | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
commit | 70a6b49821a3226f55e9716f32d802d06640cb89 (patch) | |
tree | 3c8ca10c1fa09e025bd266cf855a00d7d96c55aa /Lib/idlelib/configHandler.py | |
parent | ecfeb7f095dfd9c1c8929bf3df858ee35e0d9e9e (diff) | |
download | cpython-70a6b49821a3226f55e9716f32d802d06640cb89.zip cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.gz cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.bz2 |
Replace backticks with repr() or "%r"
From SF patch #852334.
Diffstat (limited to 'Lib/idlelib/configHandler.py')
-rw-r--r-- | Lib/idlelib/configHandler.py | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py index 3d79fb9..d1c2b3c 100644 --- a/Lib/idlelib/configHandler.py +++ b/Lib/idlelib/configHandler.py @@ -231,10 +231,11 @@ class IdleConf: elif self.defaultCfg[configType].has_option(section,option): return self.defaultCfg[configType].Get(section, option, type=type) else: #returning default, print warning - warning=('\n Warning: configHandler.py - IdleConf.GetOption -\n'+ - ' problem retrieving configration option '+`option`+'\n'+ - ' from section '+`section`+'.\n'+ - ' returning default value: '+`default`+'\n') + warning=('\n Warning: configHandler.py - IdleConf.GetOption -\n' + ' problem retrieving configration option %r\n' + ' from section %r.\n' + ' returning default value: %r\n' % + (option, section, default)) sys.stderr.write(warning) return default @@ -331,10 +332,11 @@ class IdleConf: for element in theme.keys(): if not cfgParser.has_option(themeName,element): #we are going to return a default, print warning - warning=('\n Warning: configHandler.py - IdleConf.GetThemeDict'+ - ' -\n problem retrieving theme element '+`element`+ - '\n from theme '+`themeName`+'.\n'+ - ' returning default value: '+`theme[element]`+'\n') + warning=('\n Warning: configHandler.py - IdleConf.GetThemeDict' + ' -\n problem retrieving theme element %r' + '\n from theme %r.\n' + ' returning default value: %r\n' % + (element, themeName, theme[element])) sys.stderr.write(warning) colour=cfgParser.Get(themeName,element,default=theme[element]) theme[element]=colour @@ -561,10 +563,11 @@ class IdleConf: if binding: keyBindings[event]=binding else: #we are going to return a default, print warning - warning=('\n Warning: configHandler.py - IdleConf.GetCoreKeys'+ - ' -\n problem retrieving key binding for event '+ - `event`+'\n from key set '+`keySetName`+'.\n'+ - ' returning default value: '+`keyBindings[event]`+'\n') + warning=('\n Warning: configHandler.py - IdleConf.GetCoreKeys' + ' -\n problem retrieving key binding for event %r' + '\n from key set %r.\n' + ' returning default value: %r\n' % + (event, keySetName, keyBindings[event])) sys.stderr.write(warning) return keyBindings |