{"action":"created","comment":{"url":"https://api.github.com/repos/sympy/sympy/pulls/comments/237175170","pull_request_review_id":179409953,"id":237175170,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzE3NTE3MA==","diff_hunk":"@@ -126,7 +126,7 @@ def solve_poly_inequalities(polys):\n     Union(Interval.open(-oo, -sqrt(3)), Interval.open(-1, 1), Interval.open(sqrt(3), oo))\n     \"\"\"\n     from sympy import Union\n-    return Union(*[solve_poly_inequality(*p) for p in polys])\n+    return Union(*sum([solve_poly_inequality(*p) for p in polys],[]))","path":"sympy/solvers/inequalities.py","position":5,"original_position":5,"commit_id":"4863e2b415be3ef587777c750e7fe9b81242a89e","original_commit_id":"4863e2b415be3ef587777c750e7fe9b81242a89e","user":{"login":"souravgl0","id":15008878,"node_id":"MDQ6VXNlcjE1MDA4ODc4","avatar_url":"https://avatars2.githubusercontent.com/u/15008878?v=4","gravatar_id":"","url":"https://api.github.com/users/souravgl0","html_url":"https://github.com/souravgl0","followers_url":"https://api.github.com/users/souravgl0/followers","following_url":"https://api.github.com/users/souravgl0/following{/other_user}","gists_url":"https://api.github.com/users/souravgl0/gists{/gist_id}","starred_url":"https://api.github.com/users/souravgl0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/souravgl0/subscriptions","organizations_url":"https://api.github.com/users/souravgl0/orgs","repos_url":"https://api.github.com/users/souravgl0/repos","events_url":"https://api.github.com/users/souravgl0/events{/privacy}","received_events_url":"https://api.github.com/users/souravgl0/received_events","type":"User","site_admin":false},"body":"I didn't know that. I'll change it to your suggestion. But I picked up the syntax only from `Union()` constructor in `sets.py`. There `sum` is used along with `map`","created_at":"2018-11-28T17:01:36Z","updated_at":"2018-11-28T17:01:36Z","html_url":"https://github.com/sympy/sympy/pull/15479#discussion_r237175170","pull_request_url":"https://api.github.com/repos/sympy/sympy/pulls/15479","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments/237175170"},"html":{"href":"https://github.com/sympy/sympy/pull/15479#discussion_r237175170"},"pull_request":{"href":"https://api.github.com/repos/sympy/sympy/pulls/15479"}},"in_reply_to_id":236868399},"pull_request":{"url":"https://api.github.com/repos/sympy/sympy/pulls/15479","id":229979027,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5OTc5MDI3","html_url":"https://github.com/sympy/sympy/pull/15479","diff_url":"https://github.com/sympy/sympy/pull/15479.diff","patch_url":"https://github.com/sympy/sympy/pull/15479.patch","issue_url":"https://api.github.com/repos/sympy/sympy/issues/15479","number":15479,"state":"open","locked":false,"title":"Sets : Union Supports Python set","user":{"login":"souravgl0","id":15008878,"node_id":"MDQ6VXNlcjE1MDA4ODc4","avatar_url":"https://avatars2.githubusercontent.com/u/15008878?v=4","gravatar_id":"","url":"https://api.github.com/users/souravgl0","html_url":"https://github.com/souravgl0","followers_url":"https://api.github.com/users/souravgl0/followers","following_url":"https://api.github.com/users/souravgl0/following{/other_user}","gists_url":"https://api.github.com/users/souravgl0/gists{/gist_id}","starred_url":"https://api.github.com/users/souravgl0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/souravgl0/subscriptions","organizations_url":"https://api.github.com/users/souravgl0/orgs","repos_url":"https://api.github.com/users/souravgl0/repos","events_url":"https://api.github.com/users/souravgl0/events{/privacy}","received_events_url":"https://api.github.com/users/souravgl0/received_events","type":"User","site_admin":false},"body":"Union Calls _sympify when an argument is a python set, except when\r\nany element of that set is a sympy Set. This is because _sympify gives\r\nunintended result when an element of set is a Set.\r\n@asmeurer Does this solve the issue?\r\nExample\r\n\r\n    >>> Union({1},{2},{3})\r\n    {1,2,3}\r\n    >>> type(Union({1},{2},{3}))\r\n    <class 'sympy.sets.sets.FiniteSet'>\r\n\r\nHowever, This does not work.\r\n        \r\n    >>> Union({1,Interval(0,1)})\r\n        TypeError: Input must be Sets or iterables of Sets\r\n\r\nAdds Test in test_union() for checking this functionality.\r\n\r\n<!-- Your title above should be a short description of what\r\nwas changed. Do not include the issue number in the title. -->\r\n\r\n#### References to other Issues or PRs\r\nFixes #15448 \r\n<!-- If this pull request fixes an issue, write \"Fixes #NNNN\" in that exact\r\nformat, e.g. \"Fixes #1234\". See\r\nhttps://github.com/blog/1506-closing-issues-via-pull-requests .-->\r\n\r\n#### Release Notes\r\n\r\n<!-- Write the release notes for this release below. See\r\nhttps://github.com/sympy/sympy/wiki/Writing-Release-Notes for more information\r\non how to write release notes. The bot will check your release notes\r\nautomatically to see if they are formatted correctly. -->\r\n\r\n<!-- BEGIN RELEASE NOTES -->\r\n* sets\r\n    *  `Union` now supports Python set `Union({1,2},{3,4})={1,2,3,4}`\r\n\r\n<!-- END RELEASE NOTES -->\r\n","created_at":"2018-11-11T21:21:19Z","updated_at":"2018-11-28T17:01:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c8b67d7d3d9ffbc78f29c02e3ceee088b1f008c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1101649306,"node_id":"MDU6TGFiZWwxMTAxNjQ5MzA2","url":"https://api.github.com/repos/sympy/sympy/labels/Backwards%20Incompatibility","name":"Backwards Incompatibility","color":"b53917","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/sympy/sympy/pulls/15479/commits","review_comments_url":"https://api.github.com/repos/sympy/sympy/pulls/15479/comments","review_comment_url":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/15479/comments","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/4863e2b415be3ef587777c750e7fe9b81242a89e","head":{"label":"souravgl0:issue-15448","ref":"issue-15448","sha":"4863e2b415be3ef587777c750e7fe9b81242a89e","user":{"login":"souravgl0","id":15008878,"node_id":"MDQ6VXNlcjE1MDA4ODc4","avatar_url":"https://avatars2.githubusercontent.com/u/15008878?v=4","gravatar_id":"","url":"https://api.github.com/users/souravgl0","html_url":"https://github.com/souravgl0","followers_url":"https://api.github.com/users/souravgl0/followers","following_url":"https://api.github.com/users/souravgl0/following{/other_user}","gists_url":"https://api.github.com/users/souravgl0/gists{/gist_id}","starred_url":"https://api.github.com/users/souravgl0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/souravgl0/subscriptions","organizations_url":"https://api.github.com/users/souravgl0/orgs","repos_url":"https://api.github.com/users/souravgl0/repos","events_url":"https://api.github.com/users/souravgl0/events{/privacy}","received_events_url":"https://api.github.com/users/souravgl0/received_events","type":"User","site_admin":false},"repo":{"id":157092158,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcwOTIxNTg=","name":"sympy","full_name":"souravgl0/sympy","private":false,"owner":{"login":"souravgl0","id":15008878,"node_id":"MDQ6VXNlcjE1MDA4ODc4","avatar_url":"https://avatars2.githubusercontent.com/u/15008878?v=4","gravatar_id":"","url":"https://api.github.com/users/souravgl0","html_url":"https://github.com/souravgl0","followers_url":"https://api.github.com/users/souravgl0/followers","following_url":"https://api.github.com/users/souravgl0/following{/other_user}","gists_url":"https://api.github.com/users/souravgl0/gists{/gist_id}","starred_url":"https://api.github.com/users/souravgl0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/souravgl0/subscriptions","organizations_url":"https://api.github.com/users/souravgl0/orgs","repos_url":"https://api.github.com/users/souravgl0/repos","events_url":"https://api.github.com/users/souravgl0/events{/privacy}","received_events_url":"https://api.github.com/users/souravgl0/received_events","type":"User","site_admin":false},"html_url":"https://github.com/souravgl0/sympy","description":"A computer algebra system written in pure Python","fork":true,"url":"https://api.github.com/repos/souravgl0/sympy","forks_url":"https://api.github.com/repos/souravgl0/sympy/forks","keys_url":"https://api.github.com/repos/souravgl0/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/souravgl0/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/souravgl0/sympy/teams","hooks_url":"https://api.github.com/repos/souravgl0/sympy/hooks","issue_events_url":"https://api.github.com/repos/souravgl0/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/souravgl0/sympy/events","assignees_url":"https://api.github.com/repos/souravgl0/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/souravgl0/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/souravgl0/sympy/tags","blobs_url":"https://api.github.com/repos/souravgl0/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/souravgl0/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/souravgl0/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/souravgl0/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/souravgl0/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/souravgl0/sympy/languages","stargazers_url":"https://api.github.com/repos/souravgl0/sympy/stargazers","contributors_url":"https://api.github.com/repos/souravgl0/sympy/contributors","subscribers_url":"https://api.github.com/repos/souravgl0/sympy/subscribers","subscription_url":"https://api.github.com/repos/souravgl0/sympy/subscription","commits_url":"https://api.github.com/repos/souravgl0/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/souravgl0/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/souravgl0/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/souravgl0/sympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/souravgl0/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/souravgl0/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/souravgl0/sympy/merges","archive_url":"https://api.github.com/repos/souravgl0/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/souravgl0/sympy/downloads","issues_url":"https://api.github.com/repos/souravgl0/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/souravgl0/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/souravgl0/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/souravgl0/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/souravgl0/sympy/labels{/name}","releases_url":"https://api.github.com/repos/souravgl0/sympy/releases{/id}","deployments_url":"https://api.github.com/repos/souravgl0/sympy/deployments","created_at":"2018-11-11T15:17:46Z","updated_at":"2018-11-12T22:14:21Z","pushed_at":"2018-11-18T08:33:30Z","git_url":"git://github.com/souravgl0/sympy.git","ssh_url":"git@github.com:souravgl0/sympy.git","clone_url":"https://github.com/souravgl0/sympy.git","svn_url":"https://github.com/souravgl0/sympy","homepage":"https://sympy.org/","size":96733,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sympy:master","ref":"master","sha":"6399a809e2683f89d74a6540fb51293f38e9923d","user":{"login":"sympy","id":260832,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MDgzMg==","avatar_url":"https://avatars1.githubusercontent.com/u/260832?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk2NDA1MzQ=","name":"sympy","full_name":"sympy/sympy","private":false,"owner":{"login":"sympy","id":260832,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MDgzMg==","avatar_url":"https://avatars1.githubusercontent.com/u/260832?v=4","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},"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":"2018-11-28T15:46:03Z","pushed_at":"2018-11-28T16:26:19Z","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":"https://sympy.org/","size":96455,"stargazers_count":5337,"watchers_count":5337,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2416,"mirror_url":null,"archived":false,"open_issues_count":3486,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2416,"open_issues":3486,"watchers":5337,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/15479"},"html":{"href":"https://github.com/sympy/sympy/pull/15479"},"issue":{"href":"https://api.github.com/repos/sympy/sympy/issues/15479"},"comments":{"href":"https://api.github.com/repos/sympy/sympy/issues/15479/comments"},"review_comments":{"href":"https://api.github.com/repos/sympy/sympy/pulls/15479/comments"},"review_comment":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sympy/sympy/pulls/15479/commits"},"statuses":{"href":"https://api.github.com/repos/sympy/sympy/statuses/4863e2b415be3ef587777c750e7fe9b81242a89e"}},"author_association":"NONE"}}
{"actor":{"display_login":"souravgl0"}}