diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-10-10 14:14:55 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-10-10 14:14:55 -0700 |
commit | ae8d7b5a1f85572dc64ee5d168240479c5cc189d (patch) | |
tree | 803997fa4f255d423374992124322d40de0139aa /numpy/lib/utils.py | |
parent | b91c711acc0514f21f66e48c948deb83f858d234 (diff) | |
parent | c3d111cc84c04b1b70c719138cc46d3ad531bfed (diff) | |
download | numpy-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.py | 5 |
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__'): |