def is_defined ( self , obj , force_import = False ) : from spyder_kernels . utils . dochelpers import isdefined ns = self . _get_current_namespace ( with_magics = True ) return isdefined ( obj , force_import = force_import , namespace = ns )
how to check function definition in python spyder
Return True if object is defined in current namespace
def is_defined(self, obj, force_import=False):
        """Return True if object is defined in current namespace"""
        from spyder_kernels.utils.dochelpers import isdefined

        ns = self._get_current_namespace(with_magics=True)
        return isdefined(obj, force_import=force_import, namespace=ns)