From ec4fc6e84e646e5fa2c597fcb7c99d146a63b81a 2010-09-03 10:10:47 From: Fernando Perez Date: 2010-09-03 10:10:47 Subject: [PATCH] Correctly set 'found' field of object info dicts. --- diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index f57f940..65b4529 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -1168,7 +1168,7 @@ class InteractiveShell(Configurable, Magic): if info.found: return self.inspector.info(info.obj, info=info) else: - return oinspect.mk_object_info({}) + return oinspect.mk_object_info({'found' : False}) #------------------------------------------------------------------------- # Things related to history management diff --git a/IPython/core/oinspect.py b/IPython/core/oinspect.py index ad4c494..68ed478 100644 --- a/IPython/core/oinspect.py +++ b/IPython/core/oinspect.py @@ -585,7 +585,7 @@ class Inspector: # store output in a dict, we'll later convert it to an ObjectInfo. We # initialize it here and fill it as we go - out = dict(isalias=isalias, ismagic=ismagic) + out = dict(found=True, isalias=isalias, ismagic=ismagic) string_max = 200 # max size of strings to show (snipped if longer) shalf = int((string_max -5)/2)