From 4fa9620fb63f34ead512f1371712452a988c7377 2017-05-11 16:45:32 From: Thomas Kluyver Date: 2017-05-11 16:45:32 Subject: [PATCH] Merge pull request #10532 from blackmagic02881/m_10531 ?? shall show docstring if source info is not available --- diff --git a/IPython/core/oinspect.py b/IPython/core/oinspect.py index ce419fc..b3021f1 100644 --- a/IPython/core/oinspect.py +++ b/IPython/core/oinspect.py @@ -648,7 +648,7 @@ class Inspector(Colorable): # Source or docstring, depending on detail level and whether # source found. - if detail_level > 0: + if detail_level > 0 and info['source']: append_field(_mime, 'Source', 'source', code_formatter) else: append_field(_mime, 'Docstring', 'docstring', formatter)