Permalink
Browse files

Address multiple decorators for source viewing.

Drops through multiple decorators as long as an object has a
__wrapped__ attribute
  • Loading branch information...
1 parent 1b4b159 commit 981d2527d34bb4336adac15ff9bc18c39c68a280 Ben Edwards committed Jul 14, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 IPython/core/oinspect.py
View
@@ -134,7 +134,7 @@ def getsource(obj,is_binary=False):
return None
else:
#get source if obj was decoratred with @decorator
- if hasattr(obj,"__wrapped__"):
+ while hasattr(obj,"__wrapped__"):
obj = obj.__wrapped__
try:
src = inspect.getsource(obj)

0 comments on commit 981d252

Please sign in to comment.