summaryrefslogtreecommitdiff
path: root/numpy/lib/src
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2009-06-06 03:50:50 +0000
committerCharles Harris <charlesr.harris@gmail.com>2009-06-06 03:50:50 +0000
commit80557498544156ebc099f2a3abb326f2255a749b (patch)
tree6274d139b76f0fd7ac6067bfa5b3d2425f29b6c9 /numpy/lib/src
parente8ede105198fe0aac551b69bf7769571fc29e4c4 (diff)
downloadnumpy-80557498544156ebc099f2a3abb326f2255a749b.tar.gz
Replace string exception "multiarray.error" exposed by multiarray module
with PyExc_Exception. Replace string exception "numpy.lib.error" exposed by numpy.lib with PyExc_Exception. This should allow old code catching the string errors to catch the standard error types that are now raised.
Diffstat (limited to 'numpy/lib/src')
-rw-r--r--numpy/lib/src/_compiled_base.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/numpy/lib/src/_compiled_base.c b/numpy/lib/src/_compiled_base.c
index 5ffedcf59..a103fe8d0 100644
--- a/numpy/lib/src/_compiled_base.c
+++ b/numpy/lib/src/_compiled_base.c
@@ -935,10 +935,12 @@ PyMODINIT_FUNC init_compiled_base(void) {
PyDict_SetItemString(d, "__version__", s);
Py_DECREF(s);
- /* Fixme; We might want to remove this error string from the dictionary */
- s = PyString_FromString("numpy.lib.error");
- PyDict_SetItemString(d, "error", s);
- Py_DECREF(s);
+ /*
+ * PyExc_Exception should catch all the standard errors that are
+ * now raised instead of the string exception "numpy.lib.error".
+ * This is for backward compatibility with existing code.
+ */
+ PyDict_SetItemString(d, "error", PyExc_Exception);
/* define PyGetSetDescr_Type and PyMemberDescr_Type */