{"action":"created","comment":{"url":"https://api.github.com/repos/sympy/sympy/pulls/comments/46965821","id":46965821,"diff_hunk":"@@ -1005,10 +1005,15 @@ def __new__(cls, expr, *variables, **assumptions):\n             variables = expr.free_symbols\n             if len(variables) != 1:\n                 from sympy.utilities.misc import filldedent\n-                raise ValueError(filldedent('''\n-                    Since there is more than one variable in the\n-                    expression, the variable(s) of differentiation\n-                    must be supplied to differentiate %s''' % expr))\n+                if len(variables) == 0:","path":"sympy/core/function.py","position":8,"original_position":8,"commit_id":"9f85ce610974b91505f7f25f6b35a75b93054ad4","original_commit_id":"9f85ce610974b91505f7f25f6b35a75b93054ad4","user":{"login":"kshitij10496","id":12427142,"avatar_url":"https://avatars.githubusercontent.com/u/12427142?v=3","gravatar_id":"","url":"https://api.github.com/users/kshitij10496","html_url":"https://github.com/kshitij10496","followers_url":"https://api.github.com/users/kshitij10496/followers","following_url":"https://api.github.com/users/kshitij10496/following{/other_user}","gists_url":"https://api.github.com/users/kshitij10496/gists{/gist_id}","starred_url":"https://api.github.com/users/kshitij10496/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshitij10496/subscriptions","organizations_url":"https://api.github.com/users/kshitij10496/orgs","repos_url":"https://api.github.com/users/kshitij10496/repos","events_url":"https://api.github.com/users/kshitij10496/events{/privacy}","received_events_url":"https://api.github.com/users/kshitij10496/received_events","type":"User","site_admin":false},"body":"@smichr Since, I am new here, this may sound a bit trivial but can't we simply use `return 0` instead of `return S.Zero` ?\r\n","created_at":"2015-12-08T15:22:52Z","updated_at":"2015-12-08T15:22:52Z","html_url":"https://github.com/sympy/sympy/pull/10202#discussion_r46965821","pull_request_url":"https://api.github.com/repos/sympy/sympy/pulls/10202","_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments/46965821"},"html":{"href":"https://github.com/sympy/sympy/pull/10202#discussion_r46965821"},"pull_request":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10202"}}},"pull_request":{"url":"https://api.github.com/repos/sympy/sympy/pulls/10202","id":52780090,"html_url":"https://github.com/sympy/sympy/pull/10202","diff_url":"https://github.com/sympy/sympy/pull/10202.diff","patch_url":"https://github.com/sympy/sympy/pull/10202.patch","issue_url":"https://api.github.com/repos/sympy/sympy/issues/10202","number":10202,"state":"open","locked":false,"title":"Added the differentiation of an expression with no variables","user":{"login":"kshitij10496","id":12427142,"avatar_url":"https://avatars.githubusercontent.com/u/12427142?v=3","gravatar_id":"","url":"https://api.github.com/users/kshitij10496","html_url":"https://github.com/kshitij10496","followers_url":"https://api.github.com/users/kshitij10496/followers","following_url":"https://api.github.com/users/kshitij10496/following{/other_user}","gists_url":"https://api.github.com/users/kshitij10496/gists{/gist_id}","starred_url":"https://api.github.com/users/kshitij10496/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshitij10496/subscriptions","organizations_url":"https://api.github.com/users/kshitij10496/orgs","repos_url":"https://api.github.com/users/kshitij10496/repos","events_url":"https://api.github.com/users/kshitij10496/events{/privacy}","received_events_url":"https://api.github.com/users/kshitij10496/received_events","type":"User","site_admin":false},"body":"fixes #10200 ","created_at":"2015-12-06T13:34:04Z","updated_at":"2015-12-08T15:22:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"201154b16d4f363c29313b66f694ebf93e014a83","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sympy/sympy/pulls/10202/commits","review_comments_url":"https://api.github.com/repos/sympy/sympy/pulls/10202/comments","review_comment_url":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/10202/comments","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/9f85ce610974b91505f7f25f6b35a75b93054ad4","head":{"label":"kshitij10496:diff_fix","ref":"diff_fix","sha":"9f85ce610974b91505f7f25f6b35a75b93054ad4","user":{"login":"kshitij10496","id":12427142,"avatar_url":"https://avatars.githubusercontent.com/u/12427142?v=3","gravatar_id":"","url":"https://api.github.com/users/kshitij10496","html_url":"https://github.com/kshitij10496","followers_url":"https://api.github.com/users/kshitij10496/followers","following_url":"https://api.github.com/users/kshitij10496/following{/other_user}","gists_url":"https://api.github.com/users/kshitij10496/gists{/gist_id}","starred_url":"https://api.github.com/users/kshitij10496/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshitij10496/subscriptions","organizations_url":"https://api.github.com/users/kshitij10496/orgs","repos_url":"https://api.github.com/users/kshitij10496/repos","events_url":"https://api.github.com/users/kshitij10496/events{/privacy}","received_events_url":"https://api.github.com/users/kshitij10496/received_events","type":"User","site_admin":false},"repo":{"id":43112313,"name":"sympy","full_name":"kshitij10496/sympy","owner":{"login":"kshitij10496","id":12427142,"avatar_url":"https://avatars.githubusercontent.com/u/12427142?v=3","gravatar_id":"","url":"https://api.github.com/users/kshitij10496","html_url":"https://github.com/kshitij10496","followers_url":"https://api.github.com/users/kshitij10496/followers","following_url":"https://api.github.com/users/kshitij10496/following{/other_user}","gists_url":"https://api.github.com/users/kshitij10496/gists{/gist_id}","starred_url":"https://api.github.com/users/kshitij10496/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshitij10496/subscriptions","organizations_url":"https://api.github.com/users/kshitij10496/orgs","repos_url":"https://api.github.com/users/kshitij10496/repos","events_url":"https://api.github.com/users/kshitij10496/events{/privacy}","received_events_url":"https://api.github.com/users/kshitij10496/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kshitij10496/sympy","description":"A computer algebra system written in pure Python","fork":true,"url":"https://api.github.com/repos/kshitij10496/sympy","forks_url":"https://api.github.com/repos/kshitij10496/sympy/forks","keys_url":"https://api.github.com/repos/kshitij10496/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kshitij10496/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kshitij10496/sympy/teams","hooks_url":"https://api.github.com/repos/kshitij10496/sympy/hooks","issue_events_url":"https://api.github.com/repos/kshitij10496/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/kshitij10496/sympy/events","assignees_url":"https://api.github.com/repos/kshitij10496/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/kshitij10496/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/kshitij10496/sympy/tags","blobs_url":"https://api.github.com/repos/kshitij10496/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kshitij10496/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kshitij10496/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/kshitij10496/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kshitij10496/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/kshitij10496/sympy/languages","stargazers_url":"https://api.github.com/repos/kshitij10496/sympy/stargazers","contributors_url":"https://api.github.com/repos/kshitij10496/sympy/contributors","subscribers_url":"https://api.github.com/repos/kshitij10496/sympy/subscribers","subscription_url":"https://api.github.com/repos/kshitij10496/sympy/subscription","commits_url":"https://api.github.com/repos/kshitij10496/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/kshitij10496/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/kshitij10496/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/kshitij10496/sympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/kshitij10496/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/kshitij10496/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kshitij10496/sympy/merges","archive_url":"https://api.github.com/repos/kshitij10496/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kshitij10496/sympy/downloads","issues_url":"https://api.github.com/repos/kshitij10496/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/kshitij10496/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/kshitij10496/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/kshitij10496/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kshitij10496/sympy/labels{/name}","releases_url":"https://api.github.com/repos/kshitij10496/sympy/releases{/id}","created_at":"2015-09-25T05:55:24Z","updated_at":"2015-11-08T09:10:29Z","pushed_at":"2015-12-06T14:03:24Z","git_url":"git://github.com/kshitij10496/sympy.git","ssh_url":"git@github.com:kshitij10496/sympy.git","clone_url":"https://github.com/kshitij10496/sympy.git","svn_url":"https://github.com/kshitij10496/sympy","homepage":"http://sympy.org/","size":72905,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"sympy:master","ref":"master","sha":"5b23c89663d3b5267124f4c1fa3d1763719bf54f","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}","created_at":"2010-04-30T20:37:14Z","updated_at":"2015-12-08T14:25:59Z","pushed_at":"2015-12-08T15:01:39Z","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":102380,"stargazers_count":2496,"watchers_count":2496,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1219,"mirror_url":null,"open_issues_count":2078,"forks":1219,"open_issues":2078,"watchers":2496,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10202"},"html":{"href":"https://github.com/sympy/sympy/pull/10202"},"issue":{"href":"https://api.github.com/repos/sympy/sympy/issues/10202"},"comments":{"href":"https://api.github.com/repos/sympy/sympy/issues/10202/comments"},"review_comments":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10202/comments"},"review_comment":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sympy/sympy/pulls/10202/commits"},"statuses":{"href":"https://api.github.com/repos/sympy/sympy/statuses/9f85ce610974b91505f7f25f6b35a75b93054ad4"}}}}