Skip to content
Browse files

In pdef, only check for old style class instances on Python 2.

Closes gh-1914
  • Loading branch information...
1 parent d2951f6 commit 08402f9e6409f61491da610c5e0b0a940b594155 @takluyver committed Jun 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 IPython/core/oinspect.py
View
2 IPython/core/oinspect.py
@@ -354,7 +354,7 @@ def pdef(self, obj, oname=''):
if inspect.isclass(obj):
header = self.__head('Class constructor information:\n')
obj = obj.__init__
- elif type(obj) is types.InstanceType:
+ elif (not py3compat.PY3) and type(obj) is types.InstanceType:
obj = obj.__call__
output = self._getdef(obj,oname)

0 comments on commit 08402f9

Please sign in to comment.
Something went wrong with that request. Please try again.