From 0a56dcb06b49721fa0b758c58183f580da1eb51a Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Sun, 25 Apr 2010 04:30:54 +0000 Subject: FIX: Workaround python3.1 callable not working with PyCapsule. --- numpy/lib/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'numpy/lib/utils.py') diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index d9e37a65b..0eedffe99 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -940,7 +940,10 @@ def _lookfor_generate_cache(module, import_modules, regenerate): kind = "class" for n, v in _getmembers(item): stack.append(("%s.%s" % (name, n), v)) - elif callable(item): + # FIXME later: workaround python3.1 capsule callable bug + # by using old version of callable. + # elif callable(item): + elif hasattr(item, "__call__"): kind = "func" doc = inspect.getdoc(item) -- cgit v1.2.1