summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
diff options
context:
space:
mode:
authorJoseph Martinot-Lagarde <joseph.martinot-lagarde@onera.fr>2013-10-09 12:55:08 +0200
committerJoseph Martinot-Lagarde <joseph.martinot-lagarde@onera.fr>2013-10-09 12:55:08 +0200
commit293b9e01c5aae668e06522427870c24564a0ebc4 (patch)
tree4e00db944e1763ec8144ddb18e31d29c3e6bef08 /numpy/lib/utils.py
parentec3603f43aaf4056bdd78401c23c937c5760f673 (diff)
downloadnumpy-293b9e01c5aae668e06522427870c24564a0ebc4.tar.gz
BUG: Disable check for oldstyle classes in python3
Fixes gh-2561
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__'):