diff options
Diffstat (limited to 'bindings/numpy.i')
-rw-r--r-- | bindings/numpy.i | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bindings/numpy.i b/bindings/numpy.i index 6f71f58..d695b36 100644 --- a/bindings/numpy.i +++ b/bindings/numpy.i @@ -107,9 +107,11 @@ if (PyDict_Check( py_obj)) return "dict" ; if (PyList_Check( py_obj)) return "list" ; if (PyTuple_Check( py_obj)) return "tuple" ; - if (PyFile_Check( py_obj)) return "file" ; if (PyModule_Check( py_obj)) return "module" ; +%#if PY_MAJOR_VERSION < 3 + if (PyFile_Check( py_obj)) return "file" ; if (PyInstance_Check(py_obj)) return "instance" ; +%#endif return "unkown type"; } |