{"action":"created","issue":{"url":"https://api.github.com/repos/ipython/ipython/issues/8529","labels_url":"https://api.github.com/repos/ipython/ipython/issues/8529/labels{/name}","comments_url":"https://api.github.com/repos/ipython/ipython/issues/8529/comments","events_url":"https://api.github.com/repos/ipython/ipython/issues/8529/events","html_url":"https://github.com/ipython/ipython/issues/8529","id":87347500,"number":8529,"title":"Code introspection with decorators feature request","user":{"login":"jrellis","id":611938,"avatar_url":"https://avatars.githubusercontent.com/u/611938?v=3","gravatar_id":"","url":"https://api.github.com/users/jrellis","html_url":"https://github.com/jrellis","followers_url":"https://api.github.com/users/jrellis/followers","following_url":"https://api.github.com/users/jrellis/following{/other_user}","gists_url":"https://api.github.com/users/jrellis/gists{/gist_id}","starred_url":"https://api.github.com/users/jrellis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrellis/subscriptions","organizations_url":"https://api.github.com/users/jrellis/orgs","repos_url":"https://api.github.com/users/jrellis/repos","events_url":"https://api.github.com/users/jrellis/events{/privacy}","received_events_url":"https://api.github.com/users/jrellis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-11T13:28:38Z","updated_at":"2015-06-11T14:46:02Z","closed_at":null,"body":"When using ?? to get source code introspection on a decorated function, only the source of the decorator is included, which is seldom what someone would be looking for. What do people think about instead showing the source of the decorated function?"},"comment":{"url":"https://api.github.com/repos/ipython/ipython/issues/comments/111158714","html_url":"https://github.com/ipython/ipython/issues/8529#issuecomment-111158714","issue_url":"https://api.github.com/repos/ipython/ipython/issues/8529","id":111158714,"user":{"login":"Carreau","id":335567,"avatar_url":"https://avatars.githubusercontent.com/u/335567?v=3","gravatar_id":"","url":"https://api.github.com/users/Carreau","html_url":"https://github.com/Carreau","followers_url":"https://api.github.com/users/Carreau/followers","following_url":"https://api.github.com/users/Carreau/following{/other_user}","gists_url":"https://api.github.com/users/Carreau/gists{/gist_id}","starred_url":"https://api.github.com/users/Carreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carreau/subscriptions","organizations_url":"https://api.github.com/users/Carreau/orgs","repos_url":"https://api.github.com/users/Carreau/repos","events_url":"https://api.github.com/users/Carreau/events{/privacy}","received_events_url":"https://api.github.com/users/Carreau/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T14:46:02Z","updated_at":"2015-06-11T14:46:02Z","body":"That is not really something IPython could decide. Decorators are syntactic sugar for:\r\n\r\n```\r\ndef fun():\r\n    pass\r\n\r\nfun = decorate(fun)\r\n```\r\n\r\nIt is the responsibility of the decorator to move things around if desires, which `functools.wraps` does for docstring. \r\n"}}