diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2011-04-05 16:10:44 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-04-05 17:38:00 -0600 |
commit | b2793ea74ea05bc64288287dd2efbe0dcae99534 (patch) | |
tree | 565008825238b770fb5ab320e857dbe7a8f4c9b2 /numpy/core/records.py | |
parent | e1a9692cc36e4353798a332c834fce7aa6cf9b54 (diff) | |
download | numpy-b2793ea74ea05bc64288287dd2efbe0dcae99534.tar.gz |
STY: Fix up some two line old-style exceptions.
Diffstat (limited to 'numpy/core/records.py')
-rw-r--r-- | numpy/core/records.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/core/records.py b/numpy/core/records.py index b2425ec6a..964b4a54e 100644 --- a/numpy/core/records.py +++ b/numpy/core/records.py @@ -244,8 +244,8 @@ class record(nt.void): return obj.view(chararray) return obj else: - raise AttributeError, "'record' object has no "\ - "attribute '%s'" % attr + raise AttributeError("'record' object has no " + "attribute '%s'" % attr) def __setattr__(self, attr, val): @@ -259,8 +259,8 @@ class record(nt.void): if getattr(self, attr, None): return nt.void.__setattr__(self, attr, val) else: - raise AttributeError, "'record' object has no "\ - "attribute '%s'" % attr + raise AttributeError("'record' object has no " + "attribute '%s'" % attr) def pprint(self): """Pretty-print all fields.""" @@ -545,8 +545,8 @@ def fromarrays(arrayList, dtype=None, shape=None, formats=None, # Determine shape from data-type. if len(descr) != len(arrayList): - raise ValueError, "mismatch between the number of fields "\ - "and the number of arrays" + raise ValueError("mismatch between the number of fields " + "and the number of arrays") d0 = descr[0].shape nn = len(d0) |