Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch '__wrapped__'

closes gh-578
  • Loading branch information...
commit fc0a73ff395c3e03e81465d94118d771fb936bb6 2 parents c98cc61 + 32cebfc
Min RK authored July 18, 2011

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  IPython/core/oinspect.py
5  IPython/core/oinspect.py
@@ -129,10 +129,13 @@ def getsource(obj,is_binary=False):
129 129
     - is_binary: whether the object is known to come from a binary source.
130 130
     This implementation will skip returning any output for binary objects, but
131 131
     custom extractors may know how to meaningfully process them."""
132  
-    
  132
+
133 133
     if is_binary:
134 134
         return None
135 135
     else:
  136
+        # get source if obj was decorated with @decorator
  137
+        if hasattr(obj,"__wrapped__"):
  138
+            obj = obj.__wrapped__
136 139
         try:
137 140
             src = inspect.getsource(obj)
138 141
         except TypeError:

0 notes on commit fc0a73f

Please sign in to comment.
Something went wrong with that request. Please try again.