diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-03-07 17:30:48 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-03-07 17:30:48 +0000 |
commit | 669454e9dc4f8472b9239b4abdec1b7e111bb864 (patch) | |
tree | e5566ce903bf0f79dd1cd8292984a3b0a6d9ca6c /Lib/dis.py | |
parent | bf7e241397165fdbe68c5119912bf64a52f0e3a0 (diff) | |
download | cpython-git-669454e9dc4f8472b9239b4abdec1b7e111bb864.tar.gz |
Whitespace normalization.
Diffstat (limited to 'Lib/dis.py')
-rw-r--r-- | Lib/dis.py | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/Lib/dis.py b/Lib/dis.py index a2c63ca940..f878d11ab9 100644 --- a/Lib/dis.py +++ b/Lib/dis.py @@ -131,45 +131,45 @@ def disassemble(co, lasti=-1): def disassemble_string(code, lasti=-1, varnames=None, names=None, constants=None): - labels = findlabels(code) - n = len(code) - i = 0 - while i < n: - c = code[i] - op = ord(c) - if op == opmap['SET_LINENO'] and i > 0: - print # Extra blank line - if i == lasti: print '-->', - else: print ' ', - if i in labels: print '>>', - else: print ' ', - print `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), - if op in hasconst: - if constants: - print '(' + `constants[oparg]` + ')', - else: - print '(%d)'%oparg, - elif op in hasname: - if names is not None: - print '(' + names[oparg] + ')', - else: - print '(%d)'%oparg, - elif op in hasjrel: - print '(to ' + `i + oparg` + ')', - elif op in haslocal: - if varnames: - print '(' + varnames[oparg] + ')', - else: - print '(%d)' % oparg, - elif op in hascompare: - print '(' + cmp_op[oparg] + ')', - print + labels = findlabels(code) + n = len(code) + i = 0 + while i < n: + c = code[i] + op = ord(c) + if op == opmap['SET_LINENO'] and i > 0: + print # Extra blank line + if i == lasti: print '-->', + else: print ' ', + if i in labels: print '>>', + else: print ' ', + print `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), + if op in hasconst: + if constants: + print '(' + `constants[oparg]` + ')', + else: + print '(%d)'%oparg, + elif op in hasname: + if names is not None: + print '(' + names[oparg] + ')', + else: + print '(%d)'%oparg, + elif op in hasjrel: + print '(to ' + `i + oparg` + ')', + elif op in haslocal: + if varnames: + print '(' + varnames[oparg] + ')', + else: + print '(%d)' % oparg, + elif op in hascompare: + print '(' + cmp_op[oparg] + ')', + print disco = disassemble # XXX For backwards compatibility |