diff options
Diffstat (limited to 'clang/utils/ABITest/Enumeration.py')
-rw-r--r-- | clang/utils/ABITest/Enumeration.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/utils/ABITest/Enumeration.py b/clang/utils/ABITest/Enumeration.py index 47e47026db0..eb53e1784ef 100644 --- a/clang/utils/ABITest/Enumeration.py +++ b/clang/utils/ABITest/Enumeration.py @@ -17,7 +17,7 @@ class Aleph0(int): return 1 def __sub__(self, b): - raise ValueError,"Cannot subtract aleph0" + raise ValueError("Cannot subtract aleph0") __rsub__ = __sub__ def __add__(self, b): @@ -86,9 +86,9 @@ def getNthPairBounded(N,W=aleph0,H=aleph0,useDivmod=False): Return the N-th pair such that 0 <= x < W and 0 <= y < H.""" if W <= 0 or H <= 0: - raise ValueError,"Invalid bounds" + raise ValueError("Invalid bounds") elif N >= W*H: - raise ValueError,"Invalid input (out of bounds)" + raise ValueError("Invalid input (out of bounds)") # Simple case... if W is aleph0 and H is aleph0: @@ -170,7 +170,7 @@ def getNthTuple(N, maxSize=aleph0, maxElement=aleph0, useDivmod=False, useLeftTo N -= 1 if maxElement is not aleph0: if maxSize is aleph0: - raise NotImplementedError,'Max element size without max size unhandled' + raise NotImplementedError('Max element size without max size unhandled') bounds = [maxElement**i for i in range(1, maxSize+1)] S,M = getNthPairVariableBounds(N, bounds) else: @@ -193,9 +193,9 @@ def getNthPairVariableBounds(N, bounds): bounds[x].""" if not bounds: - raise ValueError,"Invalid bounds" + raise ValueError("Invalid bounds") if not (0 <= N < sum(bounds)): - raise ValueError,"Invalid input (out of bounds)" + raise ValueError("Invalid input (out of bounds)") level = 0 active = range(len(bounds)) @@ -216,7 +216,7 @@ def getNthPairVariableBounds(N, bounds): N -= levelSize prevLevel = level else: - raise RuntimError,"Unexpected loop completion" + raise RuntimError("Unexpected loop completion") def getNthPairVariableBoundsChecked(N, bounds, GNVP=getNthPairVariableBounds): x,y = GNVP(N,bounds) |