Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch '__wrapped__'

closes gh-578
  • Loading branch information...
commit fc0a73ff395c3e03e81465d94118d771fb936bb6 2 parents c98cc61 + 32cebfc
@minrk minrk authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 IPython/core/oinspect.py
View
5 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 decorated with @decorator
+ if hasattr(obj,"__wrapped__"):
+ obj = obj.__wrapped__
try:
src = inspect.getsource(obj)
except TypeError:
Please sign in to comment.
Something went wrong with that request. Please try again.