{"action":"created","comment":{"url":"https://api.github.com/repos/llllllllll/codetransformer/pulls/comments/46752926","id":46752926,"diff_hunk":"@@ -196,13 +200,24 @@ def d(text, mode='exec', file=None):\n     if file is None:\n         file = sys.stdout\n \n-    for name, co in walk_code(compile(text, '<show>', mode)):\n+    for name, co in walk_code(_extract_code(obj, compile_mode=mode)):\n         print(name, file=file)\n         print('-' * len(name), file=file)\n         dis.dis(co, file=file)\n         print('', file=file)\n \n \n+def _extract_code(obj, compile_mode):","path":"codetransformer/utils/pretty.py","position":38,"original_position":38,"commit_id":"604a18351bfc512b55caede8e12f95a8d73d9d97","original_commit_id":"604a18351bfc512b55caede8e12f95a8d73d9d97","user":{"login":"llllllllll","id":3064397,"avatar_url":"https://avatars.githubusercontent.com/u/3064397?v=3","gravatar_id":"","url":"https://api.github.com/users/llllllllll","html_url":"https://github.com/llllllllll","followers_url":"https://api.github.com/users/llllllllll/followers","following_url":"https://api.github.com/users/llllllllll/following{/other_user}","gists_url":"https://api.github.com/users/llllllllll/gists{/gist_id}","starred_url":"https://api.github.com/users/llllllllll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llllllllll/subscriptions","organizations_url":"https://api.github.com/users/llllllllll/orgs","repos_url":"https://api.github.com/users/llllllllll/repos","events_url":"https://api.github.com/users/llllllllll/events{/privacy}","received_events_url":"https://api.github.com/users/llllllllll/received_events","type":"User","site_admin":false},"body":"looks like a place where we should use `singledispatch`","created_at":"2015-12-05T03:04:23Z","updated_at":"2015-12-05T03:04:23Z","html_url":"https://github.com/llllllllll/codetransformer/pull/29#discussion_r46752926","pull_request_url":"https://api.github.com/repos/llllllllll/codetransformer/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/llllllllll/codetransformer/pulls/comments/46752926"},"html":{"href":"https://github.com/llllllllll/codetransformer/pull/29#discussion_r46752926"},"pull_request":{"href":"https://api.github.com/repos/llllllllll/codetransformer/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/llllllllll/codetransformer/pulls/29","id":52744994,"html_url":"https://github.com/llllllllll/codetransformer/pull/29","diff_url":"https://github.com/llllllllll/codetransformer/pull/29.diff","patch_url":"https://github.com/llllllllll/codetransformer/pull/29.patch","issue_url":"https://api.github.com/repos/llllllllll/codetransformer/issues/29","number":29,"state":"open","locked":false,"title":"ENH: Make `d` accept function objects.","user":{"login":"ssanderson","id":1588357,"avatar_url":"https://avatars.githubusercontent.com/u/1588357?v=3","gravatar_id":"","url":"https://api.github.com/users/ssanderson","html_url":"https://github.com/ssanderson","followers_url":"https://api.github.com/users/ssanderson/followers","following_url":"https://api.github.com/users/ssanderson/following{/other_user}","gists_url":"https://api.github.com/users/ssanderson/gists{/gist_id}","starred_url":"https://api.github.com/users/ssanderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssanderson/subscriptions","organizations_url":"https://api.github.com/users/ssanderson/orgs","repos_url":"https://api.github.com/users/ssanderson/repos","events_url":"https://api.github.com/users/ssanderson/events{/privacy}","received_events_url":"https://api.github.com/users/ssanderson/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-05T03:03:53Z","updated_at":"2015-12-05T03:04:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c878ab184617f7859bbbe78c5a2a135ce31f59d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/llllllllll/codetransformer/pulls/29/commits","review_comments_url":"https://api.github.com/repos/llllllllll/codetransformer/pulls/29/comments","review_comment_url":"https://api.github.com/repos/llllllllll/codetransformer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/llllllllll/codetransformer/issues/29/comments","statuses_url":"https://api.github.com/repos/llllllllll/codetransformer/statuses/604a18351bfc512b55caede8e12f95a8d73d9d97","head":{"label":"llllllllll:generic-d","ref":"generic-d","sha":"604a18351bfc512b55caede8e12f95a8d73d9d97","user":{"login":"llllllllll","id":3064397,"avatar_url":"https://avatars.githubusercontent.com/u/3064397?v=3","gravatar_id":"","url":"https://api.github.com/users/llllllllll","html_url":"https://github.com/llllllllll","followers_url":"https://api.github.com/users/llllllllll/followers","following_url":"https://api.github.com/users/llllllllll/following{/other_user}","gists_url":"https://api.github.com/users/llllllllll/gists{/gist_id}","starred_url":"https://api.github.com/users/llllllllll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llllllllll/subscriptions","organizations_url":"https://api.github.com/users/llllllllll/orgs","repos_url":"https://api.github.com/users/llllllllll/repos","events_url":"https://api.github.com/users/llllllllll/events{/privacy}","received_events_url":"https://api.github.com/users/llllllllll/received_events","type":"User","site_admin":false},"repo":{"id":31524592,"name":"codetransformer","full_name":"llllllllll/codetransformer","owner":{"login":"llllllllll","id":3064397,"avatar_url":"https://avatars.githubusercontent.com/u/3064397?v=3","gravatar_id":"","url":"https://api.github.com/users/llllllllll","html_url":"https://github.com/llllllllll","followers_url":"https://api.github.com/users/llllllllll/followers","following_url":"https://api.github.com/users/llllllllll/following{/other_user}","gists_url":"https://api.github.com/users/llllllllll/gists{/gist_id}","starred_url":"https://api.github.com/users/llllllllll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llllllllll/subscriptions","organizations_url":"https://api.github.com/users/llllllllll/orgs","repos_url":"https://api.github.com/users/llllllllll/repos","events_url":"https://api.github.com/users/llllllllll/events{/privacy}","received_events_url":"https://api.github.com/users/llllllllll/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/llllllllll/codetransformer","description":"Python code object transformers","fork":false,"url":"https://api.github.com/repos/llllllllll/codetransformer","forks_url":"https://api.github.com/repos/llllllllll/codetransformer/forks","keys_url":"https://api.github.com/repos/llllllllll/codetransformer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/llllllllll/codetransformer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/llllllllll/codetransformer/teams","hooks_url":"https://api.github.com/repos/llllllllll/codetransformer/hooks","issue_events_url":"https://api.github.com/repos/llllllllll/codetransformer/issues/events{/number}","events_url":"https://api.github.com/repos/llllllllll/codetransformer/events","assignees_url":"https://api.github.com/repos/llllllllll/codetransformer/assignees{/user}","branches_url":"https://api.github.com/repos/llllllllll/codetransformer/branches{/branch}","tags_url":"https://api.github.com/repos/llllllllll/codetransformer/tags","blobs_url":"https://api.github.com/repos/llllllllll/codetransformer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/llllllllll/codetransformer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/llllllllll/codetransformer/git/refs{/sha}","trees_url":"https://api.github.com/repos/llllllllll/codetransformer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/llllllllll/codetransformer/statuses/{sha}","languages_url":"https://api.github.com/repos/llllllllll/codetransformer/languages","stargazers_url":"https://api.github.com/repos/llllllllll/codetransformer/stargazers","contributors_url":"https://api.github.com/repos/llllllllll/codetransformer/contributors","subscribers_url":"https://api.github.com/repos/llllllllll/codetransformer/subscribers","subscription_url":"https://api.github.com/repos/llllllllll/codetransformer/subscription","commits_url":"https://api.github.com/repos/llllllllll/codetransformer/commits{/sha}","git_commits_url":"https://api.github.com/repos/llllllllll/codetransformer/git/commits{/sha}","comments_url":"https://api.github.com/repos/llllllllll/codetransformer/comments{/number}","issue_comment_url":"https://api.github.com/repos/llllllllll/codetransformer/issues/comments{/number}","contents_url":"https://api.github.com/repos/llllllllll/codetransformer/contents/{+path}","compare_url":"https://api.github.com/repos/llllllllll/codetransformer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/llllllllll/codetransformer/merges","archive_url":"https://api.github.com/repos/llllllllll/codetransformer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/llllllllll/codetransformer/downloads","issues_url":"https://api.github.com/repos/llllllllll/codetransformer/issues{/number}","pulls_url":"https://api.github.com/repos/llllllllll/codetransformer/pulls{/number}","milestones_url":"https://api.github.com/repos/llllllllll/codetransformer/milestones{/number}","notifications_url":"https://api.github.com/repos/llllllllll/codetransformer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/llllllllll/codetransformer/labels{/name}","releases_url":"https://api.github.com/repos/llllllllll/codetransformer/releases{/id}","created_at":"2015-03-02T05:18:03Z","updated_at":"2015-11-04T21:41:16Z","pushed_at":"2015-12-05T03:03:54Z","git_url":"git://github.com/llllllllll/codetransformer.git","ssh_url":"git@github.com:llllllllll/codetransformer.git","clone_url":"https://github.com/llllllllll/codetransformer.git","svn_url":"https://github.com/llllllllll/codetransformer","homepage":null,"size":155,"stargazers_count":18,"watchers_count":18,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":18,"default_branch":"master"}},"base":{"label":"llllllllll:master","ref":"master","sha":"598973329491eb4671ccdc82be849ad407c11392","user":{"login":"llllllllll","id":3064397,"avatar_url":"https://avatars.githubusercontent.com/u/3064397?v=3","gravatar_id":"","url":"https://api.github.com/users/llllllllll","html_url":"https://github.com/llllllllll","followers_url":"https://api.github.com/users/llllllllll/followers","following_url":"https://api.github.com/users/llllllllll/following{/other_user}","gists_url":"https://api.github.com/users/llllllllll/gists{/gist_id}","starred_url":"https://api.github.com/users/llllllllll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llllllllll/subscriptions","organizations_url":"https://api.github.com/users/llllllllll/orgs","repos_url":"https://api.github.com/users/llllllllll/repos","events_url":"https://api.github.com/users/llllllllll/events{/privacy}","received_events_url":"https://api.github.com/users/llllllllll/received_events","type":"User","site_admin":false},"repo":{"id":31524592,"name":"codetransformer","full_name":"llllllllll/codetransformer","owner":{"login":"llllllllll","id":3064397,"avatar_url":"https://avatars.githubusercontent.com/u/3064397?v=3","gravatar_id":"","url":"https://api.github.com/users/llllllllll","html_url":"https://github.com/llllllllll","followers_url":"https://api.github.com/users/llllllllll/followers","following_url":"https://api.github.com/users/llllllllll/following{/other_user}","gists_url":"https://api.github.com/users/llllllllll/gists{/gist_id}","starred_url":"https://api.github.com/users/llllllllll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llllllllll/subscriptions","organizations_url":"https://api.github.com/users/llllllllll/orgs","repos_url":"https://api.github.com/users/llllllllll/repos","events_url":"https://api.github.com/users/llllllllll/events{/privacy}","received_events_url":"https://api.github.com/users/llllllllll/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/llllllllll/codetransformer","description":"Python code object transformers","fork":false,"url":"https://api.github.com/repos/llllllllll/codetransformer","forks_url":"https://api.github.com/repos/llllllllll/codetransformer/forks","keys_url":"https://api.github.com/repos/llllllllll/codetransformer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/llllllllll/codetransformer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/llllllllll/codetransformer/teams","hooks_url":"https://api.github.com/repos/llllllllll/codetransformer/hooks","issue_events_url":"https://api.github.com/repos/llllllllll/codetransformer/issues/events{/number}","events_url":"https://api.github.com/repos/llllllllll/codetransformer/events","assignees_url":"https://api.github.com/repos/llllllllll/codetransformer/assignees{/user}","branches_url":"https://api.github.com/repos/llllllllll/codetransformer/branches{/branch}","tags_url":"https://api.github.com/repos/llllllllll/codetransformer/tags","blobs_url":"https://api.github.com/repos/llllllllll/codetransformer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/llllllllll/codetransformer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/llllllllll/codetransformer/git/refs{/sha}","trees_url":"https://api.github.com/repos/llllllllll/codetransformer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/llllllllll/codetransformer/statuses/{sha}","languages_url":"https://api.github.com/repos/llllllllll/codetransformer/languages","stargazers_url":"https://api.github.com/repos/llllllllll/codetransformer/stargazers","contributors_url":"https://api.github.com/repos/llllllllll/codetransformer/contributors","subscribers_url":"https://api.github.com/repos/llllllllll/codetransformer/subscribers","subscription_url":"https://api.github.com/repos/llllllllll/codetransformer/subscription","commits_url":"https://api.github.com/repos/llllllllll/codetransformer/commits{/sha}","git_commits_url":"https://api.github.com/repos/llllllllll/codetransformer/git/commits{/sha}","comments_url":"https://api.github.com/repos/llllllllll/codetransformer/comments{/number}","issue_comment_url":"https://api.github.com/repos/llllllllll/codetransformer/issues/comments{/number}","contents_url":"https://api.github.com/repos/llllllllll/codetransformer/contents/{+path}","compare_url":"https://api.github.com/repos/llllllllll/codetransformer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/llllllllll/codetransformer/merges","archive_url":"https://api.github.com/repos/llllllllll/codetransformer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/llllllllll/codetransformer/downloads","issues_url":"https://api.github.com/repos/llllllllll/codetransformer/issues{/number}","pulls_url":"https://api.github.com/repos/llllllllll/codetransformer/pulls{/number}","milestones_url":"https://api.github.com/repos/llllllllll/codetransformer/milestones{/number}","notifications_url":"https://api.github.com/repos/llllllllll/codetransformer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/llllllllll/codetransformer/labels{/name}","releases_url":"https://api.github.com/repos/llllllllll/codetransformer/releases{/id}","created_at":"2015-03-02T05:18:03Z","updated_at":"2015-11-04T21:41:16Z","pushed_at":"2015-12-05T03:03:54Z","git_url":"git://github.com/llllllllll/codetransformer.git","ssh_url":"git@github.com:llllllllll/codetransformer.git","clone_url":"https://github.com/llllllllll/codetransformer.git","svn_url":"https://github.com/llllllllll/codetransformer","homepage":null,"size":155,"stargazers_count":18,"watchers_count":18,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/llllllllll/codetransformer/pulls/29"},"html":{"href":"https://github.com/llllllllll/codetransformer/pull/29"},"issue":{"href":"https://api.github.com/repos/llllllllll/codetransformer/issues/29"},"comments":{"href":"https://api.github.com/repos/llllllllll/codetransformer/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/llllllllll/codetransformer/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/llllllllll/codetransformer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/llllllllll/codetransformer/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/llllllllll/codetransformer/statuses/604a18351bfc512b55caede8e12f95a8d73d9d97"}}}}