summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-10-10 14:14:55 -0700
committerCharles Harris <charlesr.harris@gmail.com>2013-10-10 14:14:55 -0700
commitae8d7b5a1f85572dc64ee5d168240479c5cc189d (patch)
tree803997fa4f255d423374992124322d40de0139aa /numpy/lib/utils.py
parentb91c711acc0514f21f66e48c948deb83f858d234 (diff)
parentc3d111cc84c04b1b70c719138cc46d3ad531bfed (diff)
downloadnumpy-ae8d7b5a1f85572dc64ee5d168240479c5cc189d.tar.gz
Merge pull request #3885 from Nodd/py3_info
BUG: Disable check for oldstyle classes in python3 (np.info)
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r--numpy/lib/utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index 40e13bdc3..1f1cdfc8a 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -561,7 +561,10 @@ def info(object=None,maxwidth=76,output=sys.stdout,toplevel='numpy'):
methstr, other = pydoc.splitdoc(inspect.getdoc(thisobj) or "None")
print(" %s -- %s" % (meth, methstr), file=output)
- elif isinstance(object, types.InstanceType): ## check for __call__ method
+ elif (sys.version_info[0] < 3
+ and isinstance(object, types.InstanceType)):
+ # check for __call__ method
+ # types.InstanceType is the type of the instances of oldstyle classes
print("Instance of class: ", object.__class__.__name__, file=output)
print(file=output)
if hasattr(object, '__call__'):