From 1fd9014044386529c45d6df8d5ff30970b68de73 2014-06-18 21:41:00 From: immerrr Date: 2014-06-18 21:41:00 Subject: [PATCH] Use inspect.getdoc when populating _builtin_type_docstrings IPython.core.oinspect.getdoc uses inspect.getdoc which strips some whitespace internally and because of that inspect.getdoc(property) != property.__doc__ --- diff --git a/IPython/core/oinspect.py b/IPython/core/oinspect.py index e6434a5..68adadb 100644 --- a/IPython/core/oinspect.py +++ b/IPython/core/oinspect.py @@ -45,8 +45,8 @@ from IPython.utils.py3compat import cast_unicode, string_types, PY3 _func_call_docstring = types.FunctionType.__call__.__doc__ _object_init_docstring = object.__init__.__doc__ _builtin_type_docstrings = { - t.__doc__ for t in (types.ModuleType, types.MethodType, types.FunctionType, - property) + inspect.getdoc(t) for t in (types.ModuleType, types.MethodType, + types.FunctionType, property) } _builtin_func_type = type(all)