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/EditorWindow.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/EditorWindow.py')
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 0f0961c..65ffe54 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -761,7 +761,7 @@ class EditorWindow: try: self.load_extension(name) except: - print "Failed to load extension", `name` + print "Failed to load extension", repr(name) import traceback traceback.print_exc() @@ -937,7 +937,7 @@ class EditorWindow: elif key == 'context_use_ps1': self.context_use_ps1 = value else: - raise KeyError, "bad option name: %s" % `key` + raise KeyError, "bad option name: %r" % (key,) # If ispythonsource and guess are true, guess a good value for # indentwidth based on file content (if possible), and if @@ -1071,7 +1071,7 @@ class EditorWindow: y = PyParse.Parser(self.indentwidth, self.tabwidth) for context in self.num_context_lines: startat = max(lno - context, 1) - startatindex = `startat` + ".0" + startatindex = repr(startat) + ".0" rawtext = text.get(startatindex, "insert") y.set_str(rawtext) bod = y.find_good_parse_start( @@ -1103,7 +1103,7 @@ class EditorWindow: else: self.reindent_to(y.compute_backslash_indent()) else: - assert 0, "bogus continuation type " + `c` + assert 0, "bogus continuation type %r" % (c,) return "break" # This line starts a brand new stmt; indent relative to @@ -1333,7 +1333,7 @@ class IndentSearcher: if self.finished: return "" i = self.i = self.i + 1 - mark = `i` + ".0" + mark = repr(i) + ".0" if self.text.compare(mark, ">=", "end"): return "" return self.text.get(mark, mark + " lineend+1c") |