[pypy-commit] benchmarks default: remove name errors
fijal
noreply at buildbot.pypy.org
Sat Jul 16 17:16:33 CEST 2011
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r124:1beaa1484ca2
Date: 2011-07-16 17:14 +0200
http://bitbucket.org/pypy/benchmarks/changeset/1beaa1484ca2/
Log: remove name errors
diff --git a/own/chaos.py b/own/chaos.py
--- a/own/chaos.py
+++ b/own/chaos.py
@@ -29,7 +29,7 @@
def __add__(self, other):
if not isinstance(other, GVector):
- raise exceptions.ValueError, \
+ raise ValueError, \
"Can't add GVector to " + str(type(other))
v = GVector(self.x + other.x, self.y + other.y, self.z + other.z)
return v
@@ -71,13 +71,13 @@
self.knots = GetKnots(points, degree)
else:
if len(points) > len(knots) - degree + 1:
- raise exceptions.ValueError, "too many control points"
+ raise ValueError, "too many control points"
elif len(points) < len(knots) - degree + 1:
- raise exceptions.ValueError, "not enough control points"
+ raise ValueError, "not enough control points"
last = knots[0]
for cur in knots[1:]:
if cur < last:
- raise exceptions.ValueError, \
+ raise ValueError, \
"knots not strictly increasing"
last = cur
self.knots = knots
@@ -93,7 +93,7 @@
"""Calculates a point of the B-Spline using de Boors Algorithm"""
dom = self.GetDomain()
if u < dom[0] or u > dom[1]:
- raise exceptions.ValueError, "Function value not in domain"
+ raise ValueError, "Function value not in domain"
if u == dom[0]:
return self.points[0]
if u == dom[1]:
More information about the pypy-commit
mailing list