{"action":"created","comment":{"url":"https://api.github.com/repos/sympy/sympy/pulls/comments/57508986","id":57508986,"diff_hunk":"@@ -3311,6 +3311,10 @@ def _sage_(self):\n         import sage.all as sage\n         return sage.golden_ratio\n \n+    def _eval_rewrite_as_sqrt(self):\n+        from sympy import sqrt\n+        return S.Half + S.Half*sqrt(5)","path":"sympy/core/numbers.py","position":6,"original_position":6,"commit_id":"35e5cad9272c3726d2906a74e243c59cd86e8bff","original_commit_id":"e22362d902ef57f762e56f83c50bbcb2a093603b","user":{"login":"Nitin216","id":10063565,"avatar_url":"https://avatars.githubusercontent.com/u/10063565?v=3","gravatar_id":"","url":"https://api.github.com/users/Nitin216","html_url":"https://github.com/Nitin216","followers_url":"https://api.github.com/users/Nitin216/followers","following_url":"https://api.github.com/users/Nitin216/following{/other_user}","gists_url":"https://api.github.com/users/Nitin216/gists{/gist_id}","starred_url":"https://api.github.com/users/Nitin216/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nitin216/subscriptions","organizations_url":"https://api.github.com/users/Nitin216/orgs","repos_url":"https://api.github.com/users/Nitin216/repos","events_url":"https://api.github.com/users/Nitin216/events{/privacy}","received_events_url":"https://api.github.com/users/Nitin216/received_events","type":"User","site_admin":false},"body":"@leosartaj In GoldenRatio, there is already an ```_eval_expand_func```. So what do u want","created_at":"2016-03-26T04:10:12Z","updated_at":"2016-03-26T04:10:12Z","html_url":"https://github.com/sympy/sympy/pull/10900#discussion_r57508986","pull_request_url":"https://api.github.com/repos/sympy/sympy/pulls/10900","_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments/57508986"},"html":{"href":"https://github.com/sympy/sympy/pull/10900#discussion_r57508986"},"pull_request":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10900"}}},"pull_request":{"url":"https://api.github.com/repos/sympy/sympy/pulls/10900","id":64017808,"html_url":"https://github.com/sympy/sympy/pull/10900","diff_url":"https://github.com/sympy/sympy/pull/10900.diff","patch_url":"https://github.com/sympy/sympy/pull/10900.patch","issue_url":"https://api.github.com/repos/sympy/sympy/issues/10900","number":10900,"state":"open","locked":false,"title":"Fixed Issue #10894","user":{"login":"Nitin216","id":10063565,"avatar_url":"https://avatars.githubusercontent.com/u/10063565?v=3","gravatar_id":"","url":"https://api.github.com/users/Nitin216","html_url":"https://github.com/Nitin216","followers_url":"https://api.github.com/users/Nitin216/followers","following_url":"https://api.github.com/users/Nitin216/following{/other_user}","gists_url":"https://api.github.com/users/Nitin216/gists{/gist_id}","starred_url":"https://api.github.com/users/Nitin216/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nitin216/subscriptions","organizations_url":"https://api.github.com/users/Nitin216/orgs","repos_url":"https://api.github.com/users/Nitin216/repos","events_url":"https://api.github.com/users/Nitin216/events{/privacy}","received_events_url":"https://api.github.com/users/Nitin216/received_events","type":"User","site_admin":false},"body":"Now the ouput is \r\n```\r\nIn [2]: GoldenRatio.rewrite(sqrt)\r\nOut[2]:\r\n      ___\r\n1   \\/ 5\r\n- + -----\r\n2     2\r\n```\r\nAlso added tests.\r\n\r\n_____\r\nTODO\r\n\r\n- [ ] should this be written as `_eval_expand_func`?","created_at":"2016-03-24T10:57:14Z","updated_at":"2016-03-26T04:10:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"462a4c5bf58319aa250bee16eb0be544a05891a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sympy/sympy/pulls/10900/commits","review_comments_url":"https://api.github.com/repos/sympy/sympy/pulls/10900/comments","review_comment_url":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/10900/comments","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/35e5cad9272c3726d2906a74e243c59cd86e8bff","head":{"label":"Nitin216:issue_10894","ref":"issue_10894","sha":"35e5cad9272c3726d2906a74e243c59cd86e8bff","user":{"login":"Nitin216","id":10063565,"avatar_url":"https://avatars.githubusercontent.com/u/10063565?v=3","gravatar_id":"","url":"https://api.github.com/users/Nitin216","html_url":"https://github.com/Nitin216","followers_url":"https://api.github.com/users/Nitin216/followers","following_url":"https://api.github.com/users/Nitin216/following{/other_user}","gists_url":"https://api.github.com/users/Nitin216/gists{/gist_id}","starred_url":"https://api.github.com/users/Nitin216/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nitin216/subscriptions","organizations_url":"https://api.github.com/users/Nitin216/orgs","repos_url":"https://api.github.com/users/Nitin216/repos","events_url":"https://api.github.com/users/Nitin216/events{/privacy}","received_events_url":"https://api.github.com/users/Nitin216/received_events","type":"User","site_admin":false},"repo":{"id":49775101,"name":"sympy","full_name":"Nitin216/sympy","owner":{"login":"Nitin216","id":10063565,"avatar_url":"https://avatars.githubusercontent.com/u/10063565?v=3","gravatar_id":"","url":"https://api.github.com/users/Nitin216","html_url":"https://github.com/Nitin216","followers_url":"https://api.github.com/users/Nitin216/followers","following_url":"https://api.github.com/users/Nitin216/following{/other_user}","gists_url":"https://api.github.com/users/Nitin216/gists{/gist_id}","starred_url":"https://api.github.com/users/Nitin216/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nitin216/subscriptions","organizations_url":"https://api.github.com/users/Nitin216/orgs","repos_url":"https://api.github.com/users/Nitin216/repos","events_url":"https://api.github.com/users/Nitin216/events{/privacy}","received_events_url":"https://api.github.com/users/Nitin216/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nitin216/sympy","description":"A computer algebra system written in pure Python","fork":true,"url":"https://api.github.com/repos/Nitin216/sympy","forks_url":"https://api.github.com/repos/Nitin216/sympy/forks","keys_url":"https://api.github.com/repos/Nitin216/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nitin216/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nitin216/sympy/teams","hooks_url":"https://api.github.com/repos/Nitin216/sympy/hooks","issue_events_url":"https://api.github.com/repos/Nitin216/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/Nitin216/sympy/events","assignees_url":"https://api.github.com/repos/Nitin216/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/Nitin216/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/Nitin216/sympy/tags","blobs_url":"https://api.github.com/repos/Nitin216/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nitin216/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nitin216/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nitin216/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nitin216/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/Nitin216/sympy/languages","stargazers_url":"https://api.github.com/repos/Nitin216/sympy/stargazers","contributors_url":"https://api.github.com/repos/Nitin216/sympy/contributors","subscribers_url":"https://api.github.com/repos/Nitin216/sympy/subscribers","subscription_url":"https://api.github.com/repos/Nitin216/sympy/subscription","commits_url":"https://api.github.com/repos/Nitin216/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nitin216/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nitin216/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nitin216/sympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nitin216/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/Nitin216/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nitin216/sympy/merges","archive_url":"https://api.github.com/repos/Nitin216/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nitin216/sympy/downloads","issues_url":"https://api.github.com/repos/Nitin216/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/Nitin216/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/Nitin216/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/Nitin216/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nitin216/sympy/labels{/name}","releases_url":"https://api.github.com/repos/Nitin216/sympy/releases{/id}","deployments_url":"https://api.github.com/repos/Nitin216/sympy/deployments","created_at":"2016-01-16T13:47:14Z","updated_at":"2016-01-16T13:47:20Z","pushed_at":"2016-03-24T19:51:10Z","git_url":"git://github.com/Nitin216/sympy.git","ssh_url":"git@github.com:Nitin216/sympy.git","clone_url":"https://github.com/Nitin216/sympy.git","svn_url":"https://github.com/Nitin216/sympy","homepage":"http://sympy.org/","size":76415,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sympy:master","ref":"master","sha":"f32d8386dbab72c56575afa19f329912a7849c75","user":{"login":"sympy","id":260832,"avatar_url":"https://avatars.githubusercontent.com/u/260832?v=3","gravatar_id":"","url":"https://api.github.com/users/sympy","html_url":"https://github.com/sympy","followers_url":"https://api.github.com/users/sympy/followers","following_url":"https://api.github.com/users/sympy/following{/other_user}","gists_url":"https://api.github.com/users/sympy/gists{/gist_id}","starred_url":"https://api.github.com/users/sympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sympy/subscriptions","organizations_url":"https://api.github.com/users/sympy/orgs","repos_url":"https://api.github.com/users/sympy/repos","events_url":"https://api.github.com/users/sympy/events{/privacy}","received_events_url":"https://api.github.com/users/sympy/received_events","type":"Organization","site_admin":false},"repo":{"id":640534,"name":"sympy","full_name":"sympy/sympy","owner":{"login":"sympy","id":260832,"avatar_url":"https://avatars.githubusercontent.com/u/260832?v=3","gravatar_id":"","url":"https://api.github.com/users/sympy","html_url":"https://github.com/sympy","followers_url":"https://api.github.com/users/sympy/followers","following_url":"https://api.github.com/users/sympy/following{/other_user}","gists_url":"https://api.github.com/users/sympy/gists{/gist_id}","starred_url":"https://api.github.com/users/sympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sympy/subscriptions","organizations_url":"https://api.github.com/users/sympy/orgs","repos_url":"https://api.github.com/users/sympy/repos","events_url":"https://api.github.com/users/sympy/events{/privacy}","received_events_url":"https://api.github.com/users/sympy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sympy/sympy","description":"A computer algebra system written in pure Python","fork":false,"url":"https://api.github.com/repos/sympy/sympy","forks_url":"https://api.github.com/repos/sympy/sympy/forks","keys_url":"https://api.github.com/repos/sympy/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sympy/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sympy/sympy/teams","hooks_url":"https://api.github.com/repos/sympy/sympy/hooks","issue_events_url":"https://api.github.com/repos/sympy/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/sympy/sympy/events","assignees_url":"https://api.github.com/repos/sympy/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/sympy/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/sympy/sympy/tags","blobs_url":"https://api.github.com/repos/sympy/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sympy/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sympy/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/sympy/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/sympy/sympy/languages","stargazers_url":"https://api.github.com/repos/sympy/sympy/stargazers","contributors_url":"https://api.github.com/repos/sympy/sympy/contributors","subscribers_url":"https://api.github.com/repos/sympy/sympy/subscribers","subscription_url":"https://api.github.com/repos/sympy/sympy/subscription","commits_url":"https://api.github.com/repos/sympy/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/sympy/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/sympy/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/sympy/sympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/sympy/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/sympy/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sympy/sympy/merges","archive_url":"https://api.github.com/repos/sympy/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sympy/sympy/downloads","issues_url":"https://api.github.com/repos/sympy/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/sympy/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/sympy/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/sympy/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sympy/sympy/labels{/name}","releases_url":"https://api.github.com/repos/sympy/sympy/releases{/id}","deployments_url":"https://api.github.com/repos/sympy/sympy/deployments","created_at":"2010-04-30T20:37:14Z","updated_at":"2016-03-25T07:56:58Z","pushed_at":"2016-03-26T02:43:11Z","git_url":"git://github.com/sympy/sympy.git","ssh_url":"git@github.com:sympy/sympy.git","clone_url":"https://github.com/sympy/sympy.git","svn_url":"https://github.com/sympy/sympy","homepage":"http://sympy.org/","size":106685,"stargazers_count":2745,"watchers_count":2745,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1421,"mirror_url":null,"open_issues_count":2256,"forks":1421,"open_issues":2256,"watchers":2745,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10900"},"html":{"href":"https://github.com/sympy/sympy/pull/10900"},"issue":{"href":"https://api.github.com/repos/sympy/sympy/issues/10900"},"comments":{"href":"https://api.github.com/repos/sympy/sympy/issues/10900/comments"},"review_comments":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10900/comments"},"review_comment":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10900/commits"},"statuses":{"href":"https://api.github.com/repos/sympy/sympy/statuses/35e5cad9272c3726d2906a74e243c59cd86e8bff"}}}}