Skip to content

Commit

Permalink
In pdef, only check for old style class instances on Python 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Jun 11, 2012
1 parent d2951f6 commit 08402f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IPython/core/oinspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 08402f9

Please sign in to comment.