mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Remove uses of string module and stat.ST_MODE
This commit is contained in:
parent
ec7cf1382b
commit
a312c3ade7
3 changed files with 7 additions and 11 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
import dis
|
||||
import new
|
||||
import string
|
||||
import sys
|
||||
import types
|
||||
|
||||
|
@ -246,7 +245,7 @@ class Block:
|
|||
def __str__(self):
|
||||
insts = map(str, self.insts)
|
||||
return "<block %s %d:\n%s>" % (self.label, self.bid,
|
||||
string.join(insts, '\n'))
|
||||
'\n'.join(insts))
|
||||
|
||||
def emit(self, inst):
|
||||
op = inst[0]
|
||||
|
@ -713,10 +712,10 @@ class LineAddrTable:
|
|||
self.lastoff = self.codeOffset
|
||||
|
||||
def getCode(self):
|
||||
return string.join(self.code, '')
|
||||
return ''.join(self.code)
|
||||
|
||||
def getTable(self):
|
||||
return string.join(map(chr, self.lnotab), '')
|
||||
return ''.join(map(chr, self.lnotab))
|
||||
|
||||
class StackDepthTracker:
|
||||
# XXX 1. need to keep track of stack depth on jumps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue