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/pstats.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/pstats.py')
-rw-r--r-- | Lib/pstats.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Lib/pstats.py b/Lib/pstats.py index 9e202e9..5979a61 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -117,9 +117,8 @@ class Stats: self.stats = arg.stats arg.stats = {} if not self.stats: - raise TypeError, "Cannot create or construct a " \ - + `self.__class__` \ - + " object from '" + `arg` + "'" + raise TypeError, "Cannot create or construct a %r object from '%r''" % ( + self.__class__, arg) return def get_top_level_stats(self): @@ -300,9 +299,8 @@ class Stats: count = sel new_list = list[:count] if len(list) != len(new_list): - msg = msg + " List reduced from " + `len(list)` \ - + " to " + `len(new_list)` + \ - " due to restriction <" + `sel` + ">\n" + msg = msg + " List reduced from %r to %r due to restriction <%r>\n" % ( + len(list), len(new_list), sel) return new_list, msg @@ -392,8 +390,7 @@ class Stats: indent = "" for func in clist: name = func_std_string(func) - print indent*name_size + name + '(' \ - + `call_dict[func]`+')', \ + print indent*name_size + name + '(%r)' % (call_dict[func],), \ f8(self.stats[func][3]) indent = " " |