{"action":"created","comment":{"url":"https://api.github.com/repos/python/typeshed/pulls/comments/81441258","pull_request_review_id":2423238,"id":81441258,"diff_hunk":"@@ -30,7 +30,7 @@ DefaultDict = TypeAlias(object)\n Set = TypeAlias(object)\n \n # Predefined type variables.\n-AnyStr = TypeVar('AnyStr', str, unicode)\n+AnyStr = TypeVar('AnyStr', bytes, str, unicode)","path":"stdlib/2.7/typing.pyi","position":5,"original_position":5,"commit_id":"455f8aa834ee7fc6b1527cce0f838d4829a4e1d3","original_commit_id":"455f8aa834ee7fc6b1527cce0f838d4829a4e1d3","user":{"login":"gvanrossum","id":2894642,"avatar_url":"https://avatars.githubusercontent.com/u/2894642?v=3","gravatar_id":"","url":"https://api.github.com/users/gvanrossum","html_url":"https://github.com/gvanrossum","followers_url":"https://api.github.com/users/gvanrossum/followers","following_url":"https://api.github.com/users/gvanrossum/following{/other_user}","gists_url":"https://api.github.com/users/gvanrossum/gists{/gist_id}","starred_url":"https://api.github.com/users/gvanrossum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvanrossum/subscriptions","organizations_url":"https://api.github.com/users/gvanrossum/orgs","repos_url":"https://api.github.com/users/gvanrossum/repos","events_url":"https://api.github.com/users/gvanrossum/events{/privacy}","received_events_url":"https://api.github.com/users/gvanrossum/received_events","type":"User","site_admin":false},"body":"This is key, but also annoying. E.g. this code breaks because of this:\r\n```\r\ndef f(a): # type: (AnyStr) -> AnyStr\r\n    if isinstance(a, str): return '.'\r\n    else: return u'.'\r\n```\r\nYou have to add a third case (`elif isinstance(a, bytes): return b'.'`). You can'y even collapse this as `isinstance(a, (str, bytes))` because the return type (in this example) must match the argument.","created_at":"2016-10-01T02:09:23Z","updated_at":"2016-10-01T02:10:13Z","html_url":"https://github.com/python/typeshed/pull/580#discussion_r81441258","pull_request_url":"https://api.github.com/repos/python/typeshed/pulls/580","_links":{"self":{"href":"https://api.github.com/repos/python/typeshed/pulls/comments/81441258"},"html":{"href":"https://github.com/python/typeshed/pull/580#discussion_r81441258"},"pull_request":{"href":"https://api.github.com/repos/python/typeshed/pulls/580"}}},"pull_request":{"url":"https://api.github.com/repos/python/typeshed/pulls/580","id":87587264,"html_url":"https://github.com/python/typeshed/pull/580","diff_url":"https://github.com/python/typeshed/pull/580.diff","patch_url":"https://github.com/python/typeshed/pull/580.patch","issue_url":"https://api.github.com/repos/python/typeshed/issues/580","number":580,"state":"open","locked":false,"title":"[WIP] introduce a distinct bytes type.","user":{"login":"gvanrossum","id":2894642,"avatar_url":"https://avatars.githubusercontent.com/u/2894642?v=3","gravatar_id":"","url":"https://api.github.com/users/gvanrossum","html_url":"https://github.com/gvanrossum","followers_url":"https://api.github.com/users/gvanrossum/followers","following_url":"https://api.github.com/users/gvanrossum/following{/other_user}","gists_url":"https://api.github.com/users/gvanrossum/gists{/gist_id}","starred_url":"https://api.github.com/users/gvanrossum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvanrossum/subscriptions","organizations_url":"https://api.github.com/users/gvanrossum/orgs","repos_url":"https://api.github.com/users/gvanrossum/repos","events_url":"https://api.github.com/users/gvanrossum/events{/privacy}","received_events_url":"https://api.github.com/users/gvanrossum/received_events","type":"User","site_admin":false},"body":"See python/typing#208","created_at":"2016-10-01T01:34:06Z","updated_at":"2016-10-01T02:10:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5b4f0c799bf21b9cfac510ea0e3029b2fced4d60","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/python/typeshed/pulls/580/commits","review_comments_url":"https://api.github.com/repos/python/typeshed/pulls/580/comments","review_comment_url":"https://api.github.com/repos/python/typeshed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/python/typeshed/issues/580/comments","statuses_url":"https://api.github.com/repos/python/typeshed/statuses/455f8aa834ee7fc6b1527cce0f838d4829a4e1d3","head":{"label":"python:strbyt","ref":"strbyt","sha":"455f8aa834ee7fc6b1527cce0f838d4829a4e1d3","user":{"login":"python","id":1525981,"avatar_url":"https://avatars.githubusercontent.com/u/1525981?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"repo":{"id":31696383,"name":"typeshed","full_name":"python/typeshed","owner":{"login":"python","id":1525981,"avatar_url":"https://avatars.githubusercontent.com/u/1525981?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python/typeshed","description":"Collection of library stubs for Python, with static types","fork":false,"url":"https://api.github.com/repos/python/typeshed","forks_url":"https://api.github.com/repos/python/typeshed/forks","keys_url":"https://api.github.com/repos/python/typeshed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python/typeshed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python/typeshed/teams","hooks_url":"https://api.github.com/repos/python/typeshed/hooks","issue_events_url":"https://api.github.com/repos/python/typeshed/issues/events{/number}","events_url":"https://api.github.com/repos/python/typeshed/events","assignees_url":"https://api.github.com/repos/python/typeshed/assignees{/user}","branches_url":"https://api.github.com/repos/python/typeshed/branches{/branch}","tags_url":"https://api.github.com/repos/python/typeshed/tags","blobs_url":"https://api.github.com/repos/python/typeshed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python/typeshed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python/typeshed/git/refs{/sha}","trees_url":"https://api.github.com/repos/python/typeshed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python/typeshed/statuses/{sha}","languages_url":"https://api.github.com/repos/python/typeshed/languages","stargazers_url":"https://api.github.com/repos/python/typeshed/stargazers","contributors_url":"https://api.github.com/repos/python/typeshed/contributors","subscribers_url":"https://api.github.com/repos/python/typeshed/subscribers","subscription_url":"https://api.github.com/repos/python/typeshed/subscription","commits_url":"https://api.github.com/repos/python/typeshed/commits{/sha}","git_commits_url":"https://api.github.com/repos/python/typeshed/git/commits{/sha}","comments_url":"https://api.github.com/repos/python/typeshed/comments{/number}","issue_comment_url":"https://api.github.com/repos/python/typeshed/issues/comments{/number}","contents_url":"https://api.github.com/repos/python/typeshed/contents/{+path}","compare_url":"https://api.github.com/repos/python/typeshed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python/typeshed/merges","archive_url":"https://api.github.com/repos/python/typeshed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python/typeshed/downloads","issues_url":"https://api.github.com/repos/python/typeshed/issues{/number}","pulls_url":"https://api.github.com/repos/python/typeshed/pulls{/number}","milestones_url":"https://api.github.com/repos/python/typeshed/milestones{/number}","notifications_url":"https://api.github.com/repos/python/typeshed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python/typeshed/labels{/name}","releases_url":"https://api.github.com/repos/python/typeshed/releases{/id}","deployments_url":"https://api.github.com/repos/python/typeshed/deployments","created_at":"2015-03-05T04:51:28Z","updated_at":"2016-09-30T14:41:19Z","pushed_at":"2016-10-01T01:34:07Z","git_url":"git://github.com/python/typeshed.git","ssh_url":"git@github.com:python/typeshed.git","clone_url":"https://github.com/python/typeshed.git","svn_url":"https://github.com/python/typeshed","homepage":null,"size":1784,"stargazers_count":247,"watchers_count":247,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":132,"mirror_url":null,"open_issues_count":69,"forks":132,"open_issues":69,"watchers":247,"default_branch":"master"}},"base":{"label":"python:master","ref":"master","sha":"0e5003b61e7c0aba8f158f72fe1827fd6dcd4673","user":{"login":"python","id":1525981,"avatar_url":"https://avatars.githubusercontent.com/u/1525981?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"repo":{"id":31696383,"name":"typeshed","full_name":"python/typeshed","owner":{"login":"python","id":1525981,"avatar_url":"https://avatars.githubusercontent.com/u/1525981?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python/typeshed","description":"Collection of library stubs for Python, with static types","fork":false,"url":"https://api.github.com/repos/python/typeshed","forks_url":"https://api.github.com/repos/python/typeshed/forks","keys_url":"https://api.github.com/repos/python/typeshed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python/typeshed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python/typeshed/teams","hooks_url":"https://api.github.com/repos/python/typeshed/hooks","issue_events_url":"https://api.github.com/repos/python/typeshed/issues/events{/number}","events_url":"https://api.github.com/repos/python/typeshed/events","assignees_url":"https://api.github.com/repos/python/typeshed/assignees{/user}","branches_url":"https://api.github.com/repos/python/typeshed/branches{/branch}","tags_url":"https://api.github.com/repos/python/typeshed/tags","blobs_url":"https://api.github.com/repos/python/typeshed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python/typeshed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python/typeshed/git/refs{/sha}","trees_url":"https://api.github.com/repos/python/typeshed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python/typeshed/statuses/{sha}","languages_url":"https://api.github.com/repos/python/typeshed/languages","stargazers_url":"https://api.github.com/repos/python/typeshed/stargazers","contributors_url":"https://api.github.com/repos/python/typeshed/contributors","subscribers_url":"https://api.github.com/repos/python/typeshed/subscribers","subscription_url":"https://api.github.com/repos/python/typeshed/subscription","commits_url":"https://api.github.com/repos/python/typeshed/commits{/sha}","git_commits_url":"https://api.github.com/repos/python/typeshed/git/commits{/sha}","comments_url":"https://api.github.com/repos/python/typeshed/comments{/number}","issue_comment_url":"https://api.github.com/repos/python/typeshed/issues/comments{/number}","contents_url":"https://api.github.com/repos/python/typeshed/contents/{+path}","compare_url":"https://api.github.com/repos/python/typeshed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python/typeshed/merges","archive_url":"https://api.github.com/repos/python/typeshed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python/typeshed/downloads","issues_url":"https://api.github.com/repos/python/typeshed/issues{/number}","pulls_url":"https://api.github.com/repos/python/typeshed/pulls{/number}","milestones_url":"https://api.github.com/repos/python/typeshed/milestones{/number}","notifications_url":"https://api.github.com/repos/python/typeshed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python/typeshed/labels{/name}","releases_url":"https://api.github.com/repos/python/typeshed/releases{/id}","deployments_url":"https://api.github.com/repos/python/typeshed/deployments","created_at":"2015-03-05T04:51:28Z","updated_at":"2016-09-30T14:41:19Z","pushed_at":"2016-10-01T01:34:07Z","git_url":"git://github.com/python/typeshed.git","ssh_url":"git@github.com:python/typeshed.git","clone_url":"https://github.com/python/typeshed.git","svn_url":"https://github.com/python/typeshed","homepage":null,"size":1784,"stargazers_count":247,"watchers_count":247,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":132,"mirror_url":null,"open_issues_count":69,"forks":132,"open_issues":69,"watchers":247,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/python/typeshed/pulls/580"},"html":{"href":"https://github.com/python/typeshed/pull/580"},"issue":{"href":"https://api.github.com/repos/python/typeshed/issues/580"},"comments":{"href":"https://api.github.com/repos/python/typeshed/issues/580/comments"},"review_comments":{"href":"https://api.github.com/repos/python/typeshed/pulls/580/comments"},"review_comment":{"href":"https://api.github.com/repos/python/typeshed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/python/typeshed/pulls/580/commits"},"statuses":{"href":"https://api.github.com/repos/python/typeshed/statuses/455f8aa834ee7fc6b1527cce0f838d4829a4e1d3"}}}}
{"actor":{"display_login":"gvanrossum"}}