mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
parent
ecfeb7f095
commit
70a6b49821
246 changed files with 926 additions and 962 deletions
|
@ -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:
|
||||
|
|
|
@ -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)."""
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue