summaryrefslogtreecommitdiffstats
path: root/Lib/dis.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2004-02-12 17:35:32 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2004-02-12 17:35:32 (GMT)
commit70a6b49821a3226f55e9716f32d802d06640cb89 (patch)
tree3c8ca10c1fa09e025bd266cf855a00d7d96c55aa /Lib/dis.py
parentecfeb7f095dfd9c1c8929bf3df858ee35e0d9e9e (diff)
downloadcpython-70a6b49821a3226f55e9716f32d802d06640cb89.zip
cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.gz
cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.bz2
Replace backticks with repr() or "%r"
From SF patch #852334.
Diffstat (limited to 'Lib/dis.py')
-rw-r--r--Lib/dis.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/dis.py b/Lib/dis.py
index 3208011..5a74b3a 100644
--- a/Lib/dis.py
+++ b/Lib/dis.py
@@ -80,7 +80,7 @@ def disassemble(co, lasti=-1):
else: print ' ',
if i in labels: print '>>',
else: print ' ',
- print `i`.rjust(4),
+ print repr(i).rjust(4),
print opname[op].ljust(20),
i = i+1
if op >= HAVE_ARGUMENT:
@@ -89,13 +89,13 @@ def disassemble(co, lasti=-1):
i = i+2
if op == EXTENDED_ARG:
extended_arg = oparg*65536L
- print `oparg`.rjust(5),
+ print repr(oparg).rjust(5),
if op in hasconst:
- print '(' + `co.co_consts[oparg]` + ')',
+ print '(' + repr(co.co_consts[oparg]) + ')',
elif op in hasname:
print '(' + co.co_names[oparg] + ')',
elif op in hasjrel:
- print '(to ' + `i + oparg` + ')',
+ print '(to ' + repr(i + oparg) + ')',
elif op in haslocal:
print '(' + co.co_varnames[oparg] + ')',
elif op in hascompare:
@@ -118,16 +118,16 @@ def disassemble_string(code, lasti=-1, varnames=None, names=None,
else: print ' ',
if i in labels: print '>>',
else: print ' ',
- print `i`.rjust(4),
+ print repr(i).rjust(4),
print opname[op].ljust(15),
i = i+1
if op >= HAVE_ARGUMENT:
oparg = ord(code[i]) + ord(code[i+1])*256
i = i+2
- print `oparg`.rjust(5),
+ print repr(oparg).rjust(5),
if op in hasconst:
if constants:
- print '(' + `constants[oparg]` + ')',
+ print '(' + repr(constants[oparg]) + ')',
else:
print '(%d)'%oparg,
elif op in hasname:
@@ -136,7 +136,7 @@ def disassemble_string(code, lasti=-1, varnames=None, names=None,
else:
print '(%d)'%oparg,
elif op in hasjrel:
- print '(to ' + `i + oparg` + ')',
+ print '(to ' + repr(i + oparg) + ')',
elif op in haslocal:
if varnames:
print '(' + varnames[oparg] + ')',