summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
diff options
context:
space:
mode:
authorSeth Troisi <sethtroisi@google.com>2020-01-28 11:39:46 -0800
committerSebastian Berg <sebastian@sipsolutions.net>2020-01-28 11:39:46 -0800
commit96727cf007217256700a1d805569a73d2171f1d5 (patch)
treeb31b6381b620029b1f3fc702243b0816380ee299 /numpy/lib/utils.py
parentd67de1bfaaa8b9e01c367c34bf76ff86124bf8dc (diff)
downloadnumpy-96727cf007217256700a1d805569a73d2171f1d5.tar.gz
MAINT: Remove sys.version checks (gh-#15373)
More sys.version cleanup.
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r--numpy/lib/utils.py35
1 files changed, 0 insertions, 35 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index 152322115..f81b4e6e4 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -605,41 +605,6 @@ def info(object=None, maxwidth=76, output=sys.stdout, toplevel='numpy'):
)
print(" %s -- %s" % (meth, methstr), file=output)
- 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__'):
- arguments = formatargspec(
- *getargspec(object.__call__.__func__)
- )
- arglist = arguments.split(', ')
- if len(arglist) > 1:
- arglist[1] = "("+arglist[1]
- arguments = ", ".join(arglist[1:])
- else:
- arguments = "()"
-
- if hasattr(object, 'name'):
- name = "%s" % object.name
- else:
- name = "<name>"
- if len(name+arguments) > maxwidth:
- argstr = _split_line(name, arguments, maxwidth)
- else:
- argstr = name + arguments
-
- print(" " + argstr + "\n", file=output)
- doc = inspect.getdoc(object.__call__)
- if doc is not None:
- print(inspect.getdoc(object.__call__), file=output)
- print(inspect.getdoc(object), file=output)
-
- else:
- print(inspect.getdoc(object), file=output)
-
elif inspect.ismethod(object):
name = object.__name__
arguments = formatargspec(