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

@ -253,7 +253,7 @@ def refile_message(e=None):
def fixfocus(near, itop):
n = scanbox.size()
for i in range(n):
line = scanbox.get(`i`)
line = scanbox.get(repr(i))
if scanparser.match(line) >= 0:
num = string.atoi(scanparser.group(1))
if num >= near:

View file

@ -183,7 +183,7 @@ class Card:
def __repr__(self):
"""Return a string for debug print statements."""
return "Card(%s, %s)" % (`self.suit`, `self.value`)
return "Card(%r, %r)" % (self.suit, self.value)
def moveto(self, x, y):
"""Move the card to absolute position (x, y)."""

View file

@ -28,7 +28,7 @@ class Test(Frame):
def moveThing(self, *args):
velocity = self.speed.get()
str = float(velocity) / 1000.0
str = `str` + "i"
str = "%ri" % (str,)
self.draw.move("thing", str, str)
self.after(10, self.moveThing)

View file

@ -39,7 +39,7 @@ class Pong(Frame):
self.x = self.x + deltax
self.y = self.y + deltay
self.draw.move(self.ball, `deltax` + "i", `deltay` + "i")
self.draw.move(self.ball, "%ri" % deltax, "%ri" % deltay)
self.after(10, self.moveBall)
def __init__(self, master=None):