summaryrefslogtreecommitdiffstats
path: root/Lib/dis.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 08:25:29 (GMT)
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 08:25:29 (GMT)
commit373c55e510f91fe2031bfb91e72fbf5d81c3915f (patch)
tree0ae98db0b1d2adfd2a249df6130332bb1426e82e /Lib/dis.py
parent9b93c5f248f9c1cab891dd58d519425ec9f838bd (diff)
downloadcpython-373c55e510f91fe2031bfb91e72fbf5d81c3915f.zip
cpython-373c55e510f91fe2031bfb91e72fbf5d81c3915f.tar.gz
cpython-373c55e510f91fe2031bfb91e72fbf5d81c3915f.tar.bz2
String method conversion.
Diffstat (limited to 'Lib/dis.py')
-rw-r--r--Lib/dis.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/dis.py b/Lib/dis.py
index 2dcecdb..dc30257 100644
--- a/Lib/dis.py
+++ b/Lib/dis.py
@@ -1,7 +1,6 @@
"""Disassembler of Python byte code into mnemonics."""
import sys
-import string
import types
__all__ = ["dis","disassemble","distb","disco","opname","cmp_op",
@@ -69,8 +68,8 @@ def disassemble(co, lasti=-1):
else: print ' ',
if i in labels: print '>>',
else: print ' ',
- print string.rjust(`i`, 4),
- print string.ljust(opname[op], 20),
+ print `i`.rjust(4),
+ print opname[op].ljust(20),
i = i+1
if op >= HAVE_ARGUMENT:
oparg = ord(code[i]) + ord(code[i+1])*256 + extended_arg
@@ -78,7 +77,7 @@ def disassemble(co, lasti=-1):
i = i+2
if op == EXTENDED_ARG:
extended_arg = oparg*65536L
- print string.rjust(`oparg`, 5),
+ print `oparg`.rjust(5),
if op in hasconst:
print '(' + `co.co_consts[oparg]` + ')',
elif op in hasname: