summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk/turtle.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 (GMT)
commitce36ad8a467d914eb5c91f33835b9eaea18ee93b (patch)
tree05bf654f3359e20b455dc300bd860bba5d291c8d /Lib/lib-tk/turtle.py
parent8b3febef2f96c35e9aad9db2ef499db040fdefae (diff)
downloadcpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.zip
cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.gz
cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.bz2
Raise statement normalization in Lib/.
Diffstat (limited to 'Lib/lib-tk/turtle.py')
-rw-r--r--Lib/lib-tk/turtle.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/lib-tk/turtle.py b/Lib/lib-tk/turtle.py
index fcde9af..434579e 100644
--- a/Lib/lib-tk/turtle.py
+++ b/Lib/lib-tk/turtle.py
@@ -231,7 +231,7 @@ class RawPen:
>>> turtle.color(0, .5, 0)
"""
if not args:
- raise Error, "no color arguments"
+ raise Error("no color arguments")
if len(args) == 1:
color = args[0]
if type(color) == type(""):
@@ -239,18 +239,18 @@ class RawPen:
try:
id = self._canvas.create_line(0, 0, 0, 0, fill=color)
except Tkinter.TclError:
- raise Error, "bad color string: %r" % (color,)
+ raise Error("bad color string: %r" % (color,))
self._set_color(color)
return
try:
r, g, b = color
except:
- raise Error, "bad color sequence: %r" % (color,)
+ raise Error("bad color sequence: %r" % (color,))
else:
try:
r, g, b = args
except:
- raise Error, "bad color arguments: %r" % (args,)
+ raise Error("bad color arguments: %r" % (args,))
assert 0 <= r <= 1
assert 0 <= g <= 1
assert 0 <= b <= 1
@@ -520,12 +520,12 @@ class RawPen:
try:
x, y = args[0]
except:
- raise Error, "bad point argument: %r" % (args[0],)
+ raise Error("bad point argument: %r" % (args[0],))
else:
try:
x, y = args
except:
- raise Error, "bad coordinates: %r" % (args[0],)
+ raise Error("bad coordinates: %r" % (args[0],))
x0, y0 = self._origin
self._goto(x0+x, y0-y)
@@ -752,25 +752,25 @@ def setup(**geometry):
if width >= 0 or width == None:
_width = width
else:
- raise ValueError, "width can not be less than 0"
+ raise ValueError("width can not be less than 0")
height = geometry.get('height',_height)
if height >= 0 or height == None:
_height = height
else:
- raise ValueError, "height can not be less than 0"
+ raise ValueError("height can not be less than 0")
startx = geometry.get('startx', _startx)
if startx >= 0 or startx == None:
_startx = _startx
else:
- raise ValueError, "startx can not be less than 0"
+ raise ValueError("startx can not be less than 0")
starty = geometry.get('starty', _starty)
if starty >= 0 or starty == None:
_starty = starty
else:
- raise ValueError, "startx can not be less than 0"
+ raise ValueError("startx can not be less than 0")
if _root and _width and _height: