{"action":"created","comment":{"url":"https://api.github.com/repos/python-pillow/Pillow/pulls/comments/91852762","pull_request_review_id":12364188,"id":91852762,"diff_hunk":"@@ -439,13 +439,9 @@ def _get_local_header(fp, im, offset, flags):\n \n             # adjust the transparency index after optimize\n             if len(used_palette_colors) < 256:\n-                for i in range(len(used_palette_colors)):\n-                    if used_palette_colors[i] == transparency:\n-                        transparency = i\n-                        transparent_color_exists = True\n-                        break\n-                    else:\n-                        transparent_color_exists = False\n+                transparent_color_exists = transparency in used_palette_colors\n+                if transparent_color_exists:","path":"PIL/GifImagePlugin.py","position":12,"original_position":12,"commit_id":"1c1740f98fc50af75df5534205959b5aaa8e02a8","original_commit_id":"1c1740f98fc50af75df5534205959b5aaa8e02a8","user":{"login":"radarhere","id":3112309,"avatar_url":"https://avatars.githubusercontent.com/u/3112309?v=3","gravatar_id":"","url":"https://api.github.com/users/radarhere","html_url":"https://github.com/radarhere","followers_url":"https://api.github.com/users/radarhere/followers","following_url":"https://api.github.com/users/radarhere/following{/other_user}","gists_url":"https://api.github.com/users/radarhere/gists{/gist_id}","starred_url":"https://api.github.com/users/radarhere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radarhere/subscriptions","organizations_url":"https://api.github.com/users/radarhere/orgs","repos_url":"https://api.github.com/users/radarhere/repos","events_url":"https://api.github.com/users/radarhere/events{/privacy}","received_events_url":"https://api.github.com/users/radarhere/received_events","type":"User","site_admin":false},"body":"You're suggesting that I combine the two lines, removing the variable? If so, it's used in lines 450-452.","created_at":"2016-12-11T10:16:27Z","updated_at":"2016-12-11T10:16:27Z","html_url":"https://github.com/python-pillow/Pillow/pull/2283#discussion_r91852762","pull_request_url":"https://api.github.com/repos/python-pillow/Pillow/pulls/2283","_links":{"self":{"href":"https://api.github.com/repos/python-pillow/Pillow/pulls/comments/91852762"},"html":{"href":"https://github.com/python-pillow/Pillow/pull/2283#discussion_r91852762"},"pull_request":{"href":"https://api.github.com/repos/python-pillow/Pillow/pulls/2283"}}},"pull_request":{"url":"https://api.github.com/repos/python-pillow/Pillow/pulls/2283","id":97446844,"html_url":"https://github.com/python-pillow/Pillow/pull/2283","diff_url":"https://github.com/python-pillow/Pillow/pull/2283.diff","patch_url":"https://github.com/python-pillow/Pillow/pull/2283.patch","issue_url":"https://api.github.com/repos/python-pillow/Pillow/issues/2283","number":2283,"state":"open","locked":false,"title":"Minor code cleanup in GifImagePlugin","user":{"login":"radarhere","id":3112309,"avatar_url":"https://avatars.githubusercontent.com/u/3112309?v=3","gravatar_id":"","url":"https://api.github.com/users/radarhere","html_url":"https://github.com/radarhere","followers_url":"https://api.github.com/users/radarhere/followers","following_url":"https://api.github.com/users/radarhere/following{/other_user}","gists_url":"https://api.github.com/users/radarhere/gists{/gist_id}","starred_url":"https://api.github.com/users/radarhere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radarhere/subscriptions","organizations_url":"https://api.github.com/users/radarhere/orgs","repos_url":"https://api.github.com/users/radarhere/repos","events_url":"https://api.github.com/users/radarhere/events{/privacy}","received_events_url":"https://api.github.com/users/radarhere/received_events","type":"User","site_admin":false},"body":"Inspired by @homm's comments in #2196","created_at":"2016-12-11T03:16:55Z","updated_at":"2016-12-11T10:16:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da16c262c689bbf9a4f14a986e464d74996d79f5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/python-pillow/Pillow/pulls/2283/commits","review_comments_url":"https://api.github.com/repos/python-pillow/Pillow/pulls/2283/comments","review_comment_url":"https://api.github.com/repos/python-pillow/Pillow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/python-pillow/Pillow/issues/2283/comments","statuses_url":"https://api.github.com/repos/python-pillow/Pillow/statuses/1c1740f98fc50af75df5534205959b5aaa8e02a8","head":{"label":"radarhere:gifimageplugin","ref":"gifimageplugin","sha":"1c1740f98fc50af75df5534205959b5aaa8e02a8","user":{"login":"radarhere","id":3112309,"avatar_url":"https://avatars.githubusercontent.com/u/3112309?v=3","gravatar_id":"","url":"https://api.github.com/users/radarhere","html_url":"https://github.com/radarhere","followers_url":"https://api.github.com/users/radarhere/followers","following_url":"https://api.github.com/users/radarhere/following{/other_user}","gists_url":"https://api.github.com/users/radarhere/gists{/gist_id}","starred_url":"https://api.github.com/users/radarhere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radarhere/subscriptions","organizations_url":"https://api.github.com/users/radarhere/orgs","repos_url":"https://api.github.com/users/radarhere/repos","events_url":"https://api.github.com/users/radarhere/events{/privacy}","received_events_url":"https://api.github.com/users/radarhere/received_events","type":"User","site_admin":false},"repo":{"id":21520263,"name":"Pillow","full_name":"radarhere/Pillow","owner":{"login":"radarhere","id":3112309,"avatar_url":"https://avatars.githubusercontent.com/u/3112309?v=3","gravatar_id":"","url":"https://api.github.com/users/radarhere","html_url":"https://github.com/radarhere","followers_url":"https://api.github.com/users/radarhere/followers","following_url":"https://api.github.com/users/radarhere/following{/other_user}","gists_url":"https://api.github.com/users/radarhere/gists{/gist_id}","starred_url":"https://api.github.com/users/radarhere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radarhere/subscriptions","organizations_url":"https://api.github.com/users/radarhere/orgs","repos_url":"https://api.github.com/users/radarhere/repos","events_url":"https://api.github.com/users/radarhere/events{/privacy}","received_events_url":"https://api.github.com/users/radarhere/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/radarhere/Pillow","description":"The friendly PIL fork","fork":true,"url":"https://api.github.com/repos/radarhere/Pillow","forks_url":"https://api.github.com/repos/radarhere/Pillow/forks","keys_url":"https://api.github.com/repos/radarhere/Pillow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/radarhere/Pillow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/radarhere/Pillow/teams","hooks_url":"https://api.github.com/repos/radarhere/Pillow/hooks","issue_events_url":"https://api.github.com/repos/radarhere/Pillow/issues/events{/number}","events_url":"https://api.github.com/repos/radarhere/Pillow/events","assignees_url":"https://api.github.com/repos/radarhere/Pillow/assignees{/user}","branches_url":"https://api.github.com/repos/radarhere/Pillow/branches{/branch}","tags_url":"https://api.github.com/repos/radarhere/Pillow/tags","blobs_url":"https://api.github.com/repos/radarhere/Pillow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/radarhere/Pillow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/radarhere/Pillow/git/refs{/sha}","trees_url":"https://api.github.com/repos/radarhere/Pillow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/radarhere/Pillow/statuses/{sha}","languages_url":"https://api.github.com/repos/radarhere/Pillow/languages","stargazers_url":"https://api.github.com/repos/radarhere/Pillow/stargazers","contributors_url":"https://api.github.com/repos/radarhere/Pillow/contributors","subscribers_url":"https://api.github.com/repos/radarhere/Pillow/subscribers","subscription_url":"https://api.github.com/repos/radarhere/Pillow/subscription","commits_url":"https://api.github.com/repos/radarhere/Pillow/commits{/sha}","git_commits_url":"https://api.github.com/repos/radarhere/Pillow/git/commits{/sha}","comments_url":"https://api.github.com/repos/radarhere/Pillow/comments{/number}","issue_comment_url":"https://api.github.com/repos/radarhere/Pillow/issues/comments{/number}","contents_url":"https://api.github.com/repos/radarhere/Pillow/contents/{+path}","compare_url":"https://api.github.com/repos/radarhere/Pillow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/radarhere/Pillow/merges","archive_url":"https://api.github.com/repos/radarhere/Pillow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/radarhere/Pillow/downloads","issues_url":"https://api.github.com/repos/radarhere/Pillow/issues{/number}","pulls_url":"https://api.github.com/repos/radarhere/Pillow/pulls{/number}","milestones_url":"https://api.github.com/repos/radarhere/Pillow/milestones{/number}","notifications_url":"https://api.github.com/repos/radarhere/Pillow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/radarhere/Pillow/labels{/name}","releases_url":"https://api.github.com/repos/radarhere/Pillow/releases{/id}","deployments_url":"https://api.github.com/repos/radarhere/Pillow/deployments","created_at":"2014-07-05T13:12:10Z","updated_at":"2016-01-15T23:03:17Z","pushed_at":"2016-12-11T03:15:24Z","git_url":"git://github.com/radarhere/Pillow.git","ssh_url":"git@github.com:radarhere/Pillow.git","clone_url":"https://github.com/radarhere/Pillow.git","svn_url":"https://github.com/radarhere/Pillow","homepage":"http://python-pillow.github.io/","size":21290,"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":"python-pillow:master","ref":"master","sha":"badbff1b99a939c05b3651db7e4aea11181e5bd7","user":{"login":"python-pillow","id":2036701,"avatar_url":"https://avatars.githubusercontent.com/u/2036701?v=3","gravatar_id":"","url":"https://api.github.com/users/python-pillow","html_url":"https://github.com/python-pillow","followers_url":"https://api.github.com/users/python-pillow/followers","following_url":"https://api.github.com/users/python-pillow/following{/other_user}","gists_url":"https://api.github.com/users/python-pillow/gists{/gist_id}","starred_url":"https://api.github.com/users/python-pillow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python-pillow/subscriptions","organizations_url":"https://api.github.com/users/python-pillow/orgs","repos_url":"https://api.github.com/users/python-pillow/repos","events_url":"https://api.github.com/users/python-pillow/events{/privacy}","received_events_url":"https://api.github.com/users/python-pillow/received_events","type":"Organization","site_admin":false},"repo":{"id":5171600,"name":"Pillow","full_name":"python-pillow/Pillow","owner":{"login":"python-pillow","id":2036701,"avatar_url":"https://avatars.githubusercontent.com/u/2036701?v=3","gravatar_id":"","url":"https://api.github.com/users/python-pillow","html_url":"https://github.com/python-pillow","followers_url":"https://api.github.com/users/python-pillow/followers","following_url":"https://api.github.com/users/python-pillow/following{/other_user}","gists_url":"https://api.github.com/users/python-pillow/gists{/gist_id}","starred_url":"https://api.github.com/users/python-pillow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python-pillow/subscriptions","organizations_url":"https://api.github.com/users/python-pillow/orgs","repos_url":"https://api.github.com/users/python-pillow/repos","events_url":"https://api.github.com/users/python-pillow/events{/privacy}","received_events_url":"https://api.github.com/users/python-pillow/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python-pillow/Pillow","description":"The friendly PIL fork (Python Imaging Library)","fork":false,"url":"https://api.github.com/repos/python-pillow/Pillow","forks_url":"https://api.github.com/repos/python-pillow/Pillow/forks","keys_url":"https://api.github.com/repos/python-pillow/Pillow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python-pillow/Pillow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python-pillow/Pillow/teams","hooks_url":"https://api.github.com/repos/python-pillow/Pillow/hooks","issue_events_url":"https://api.github.com/repos/python-pillow/Pillow/issues/events{/number}","events_url":"https://api.github.com/repos/python-pillow/Pillow/events","assignees_url":"https://api.github.com/repos/python-pillow/Pillow/assignees{/user}","branches_url":"https://api.github.com/repos/python-pillow/Pillow/branches{/branch}","tags_url":"https://api.github.com/repos/python-pillow/Pillow/tags","blobs_url":"https://api.github.com/repos/python-pillow/Pillow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python-pillow/Pillow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python-pillow/Pillow/git/refs{/sha}","trees_url":"https://api.github.com/repos/python-pillow/Pillow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python-pillow/Pillow/statuses/{sha}","languages_url":"https://api.github.com/repos/python-pillow/Pillow/languages","stargazers_url":"https://api.github.com/repos/python-pillow/Pillow/stargazers","contributors_url":"https://api.github.com/repos/python-pillow/Pillow/contributors","subscribers_url":"https://api.github.com/repos/python-pillow/Pillow/subscribers","subscription_url":"https://api.github.com/repos/python-pillow/Pillow/subscription","commits_url":"https://api.github.com/repos/python-pillow/Pillow/commits{/sha}","git_commits_url":"https://api.github.com/repos/python-pillow/Pillow/git/commits{/sha}","comments_url":"https://api.github.com/repos/python-pillow/Pillow/comments{/number}","issue_comment_url":"https://api.github.com/repos/python-pillow/Pillow/issues/comments{/number}","contents_url":"https://api.github.com/repos/python-pillow/Pillow/contents/{+path}","compare_url":"https://api.github.com/repos/python-pillow/Pillow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python-pillow/Pillow/merges","archive_url":"https://api.github.com/repos/python-pillow/Pillow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python-pillow/Pillow/downloads","issues_url":"https://api.github.com/repos/python-pillow/Pillow/issues{/number}","pulls_url":"https://api.github.com/repos/python-pillow/Pillow/pulls{/number}","milestones_url":"https://api.github.com/repos/python-pillow/Pillow/milestones{/number}","notifications_url":"https://api.github.com/repos/python-pillow/Pillow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python-pillow/Pillow/labels{/name}","releases_url":"https://api.github.com/repos/python-pillow/Pillow/releases{/id}","deployments_url":"https://api.github.com/repos/python-pillow/Pillow/deployments","created_at":"2012-07-24T21:38:39Z","updated_at":"2016-12-09T08:07:20Z","pushed_at":"2016-12-11T10:11:06Z","git_url":"git://github.com/python-pillow/Pillow.git","ssh_url":"git@github.com:python-pillow/Pillow.git","clone_url":"https://github.com/python-pillow/Pillow.git","svn_url":"https://github.com/python-pillow/Pillow","homepage":"http://python-pillow.org","size":29187,"stargazers_count":2998,"watchers_count":2998,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":661,"mirror_url":null,"open_issues_count":186,"forks":661,"open_issues":186,"watchers":2998,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/python-pillow/Pillow/pulls/2283"},"html":{"href":"https://github.com/python-pillow/Pillow/pull/2283"},"issue":{"href":"https://api.github.com/repos/python-pillow/Pillow/issues/2283"},"comments":{"href":"https://api.github.com/repos/python-pillow/Pillow/issues/2283/comments"},"review_comments":{"href":"https://api.github.com/repos/python-pillow/Pillow/pulls/2283/comments"},"review_comment":{"href":"https://api.github.com/repos/python-pillow/Pillow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/python-pillow/Pillow/pulls/2283/commits"},"statuses":{"href":"https://api.github.com/repos/python-pillow/Pillow/statuses/1c1740f98fc50af75df5534205959b5aaa8e02a8"}}}}
{"actor":{"display_login":"radarhere"}}