Use basestring instead of str
This commit is contained in:
parent
5598d1de5a
commit
d06ecc6b25
@ -331,7 +331,8 @@ class T2CharString(ByteCodeBase):
|
||||
self.program = None
|
||||
|
||||
def getToken(self, index,
|
||||
len=len, byteord=byteord, getattr=getattr, type=type, StringType=str):
|
||||
len=len, byteord=byteord, basestring=basestring,
|
||||
isinstance=isinstance):
|
||||
if self.bytecode is not None:
|
||||
if index >= len(self.bytecode):
|
||||
return None, 0, 0
|
||||
@ -344,7 +345,7 @@ class T2CharString(ByteCodeBase):
|
||||
return None, 0, 0
|
||||
token = self.program[index]
|
||||
index = index + 1
|
||||
isOperator = isinstance(token, StringType)
|
||||
isOperator = isinstance(token, basestring)
|
||||
return token, isOperator, index
|
||||
|
||||
def getBytes(self, index, nBytes):
|
||||
|
Loading…
x
Reference in New Issue
Block a user