diff --git a/IPython/core/oinspect.py b/IPython/core/oinspect.py index be80b67..67a557d 100644 --- a/IPython/core/oinspect.py +++ b/IPython/core/oinspect.py @@ -129,10 +129,13 @@ def getsource(obj,is_binary=False): - is_binary: whether the object is known to come from a binary source. This implementation will skip returning any output for binary objects, but custom extractors may know how to meaningfully process them.""" - + if is_binary: return None else: + #get source if obj was decoratred with @decorator + if hasattr(obj,"__wrapped__"): + obj = obj.__wrapped__ try: src = inspect.getsource(obj) except TypeError: