Replace backticks with repr() or "%r"

From SF patch #852334.
This commit is contained in:
Walter Dörwald 2004-02-12 17:35:32 +00:00
parent ecfeb7f095
commit 70a6b49821
246 changed files with 926 additions and 962 deletions

View file

@ -59,7 +59,7 @@ class shlex:
def push_token(self, tok):
"Push a token onto the stack popped by the get_token method"
if self.debug >= 1:
print "shlex: pushing token " + `tok`
print "shlex: pushing token " + repr(tok)
self.pushback.appendleft(tok)
def push_source(self, newstream, newfile=None):
@ -90,7 +90,7 @@ class shlex:
if self.pushback:
tok = self.pushback.popleft()
if self.debug >= 1:
print "shlex: popping token " + `tok`
print "shlex: popping token " + repr(tok)
return tok
# No pushback. Get a token.
raw = self.read_token()
@ -112,7 +112,7 @@ class shlex:
# Neither inclusion nor EOF
if self.debug >= 1:
if raw != self.eof:
print "shlex: token=" + `raw`
print "shlex: token=" + repr(raw)
else:
print "shlex: token=EOF"
return raw
@ -240,7 +240,7 @@ class shlex:
result = None
if self.debug > 1:
if result:
print "shlex: raw token=" + `result`
print "shlex: raw token=" + repr(result)
else:
print "shlex: raw token=EOF"
return result