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/pdb.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/pdb.py')
-rwxr-xr-x | Lib/pdb.py | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -219,7 +219,7 @@ class Pdb(bdb.Bdb, cmd.Cmd): filename = arg[:colon].rstrip() f = self.lookupmodule(filename) if not f: - print '*** ', `filename`, + print '*** ', repr(filename), print 'not found from sys.path' return else: @@ -252,7 +252,7 @@ class Pdb(bdb.Bdb, cmd.Cmd): (ok, filename, ln) = self.lineinfo(arg) if not ok: print '*** The specified object', - print `arg`, + print repr(arg), print 'is not a function' print ('or was not found ' 'along sys.path.') @@ -596,7 +596,7 @@ class Pdb(bdb.Bdb, cmd.Cmd): if isinstance(t, str): exc_type_name = t else: exc_type_name = t.__name__ - print '***', exc_type_name + ':', `v` + print '***', exc_type_name + ':', repr(v) raise def do_p(self, arg): @@ -627,7 +627,7 @@ class Pdb(bdb.Bdb, cmd.Cmd): else: first = max(1, int(x) - 5) except: - print '*** Error in argument:', `arg` + print '*** Error in argument:', repr(arg) return elif self.lineno is None: first = max(1, self.curframe.f_lineno - 5) @@ -644,7 +644,7 @@ class Pdb(bdb.Bdb, cmd.Cmd): print '[EOF]' break else: - s = `lineno`.rjust(3) + s = repr(lineno).rjust(3) if len(s) < 4: s = s + ' ' if lineno in breaklist: s = s + 'B' else: s = s + ' ' @@ -665,7 +665,7 @@ class Pdb(bdb.Bdb, cmd.Cmd): if type(t) == type(''): exc_type_name = t else: exc_type_name = t.__name__ - print '***', exc_type_name + ':', `v` + print '***', exc_type_name + ':', repr(v) return code = None # Is it a function? @@ -1034,7 +1034,7 @@ if __name__=='__main__': mainpyfile = filename = sys.argv[1] # Get script filename if not os.path.exists(filename): - print 'Error:', `filename`, 'does not exist' + print 'Error:', repr(filename), 'does not exist' sys.exit(1) mainmodule = os.path.basename(filename) del sys.argv[0] # Hide "pdb.py" from argument list @@ -1042,4 +1042,4 @@ if __name__=='__main__': # Insert script directory in front of module search path sys.path.insert(0, os.path.dirname(filename)) - run('execfile(' + `filename` + ')') + run('execfile(%r)' % (filename,)) |