{"action":"closed","issue":{"url":"https://api.github.com/repos/python/typing/issues/313","repository_url":"https://api.github.com/repos/python/typing","labels_url":"https://api.github.com/repos/python/typing/issues/313/labels{/name}","comments_url":"https://api.github.com/repos/python/typing/issues/313/comments","events_url":"https://api.github.com/repos/python/typing/issues/313/events","html_url":"https://github.com/python/typing/issues/313","id":186458621,"number":313,"title":"get_type_hints raises AttributeError instead of TypeError","user":{"login":"bakkerthehacker","id":1406235,"avatar_url":"https://avatars.githubusercontent.com/u/1406235?v=3","gravatar_id":"","url":"https://api.github.com/users/bakkerthehacker","html_url":"https://github.com/bakkerthehacker","followers_url":"https://api.github.com/users/bakkerthehacker/followers","following_url":"https://api.github.com/users/bakkerthehacker/following{/other_user}","gists_url":"https://api.github.com/users/bakkerthehacker/gists{/gist_id}","starred_url":"https://api.github.com/users/bakkerthehacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakkerthehacker/subscriptions","organizations_url":"https://api.github.com/users/bakkerthehacker/orgs","repos_url":"https://api.github.com/users/bakkerthehacker/repos","events_url":"https://api.github.com/users/bakkerthehacker/events{/privacy}","received_events_url":"https://api.github.com/users/bakkerthehacker/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-01T04:49:18Z","updated_at":"2016-11-06T02:55:33Z","closed_at":"2016-11-06T02:55:33Z","body":"From what I can tell, the [code here](https://hg.python.org/cpython/file/tip/Lib/typing.py#l1419) is a typo\r\n\r\n> `if isinstance(object, type):`\r\n\r\nThis causes `get_type_hints` to raise \r\n\r\n```\r\nAttributeError: 'int' object has no attribute '__code__'\r\n```\r\ninstead of \r\n```\r\nTypeError: 123 is not a module, class, method, or function.\r\n```"}}
{"actor":{"display_login":"gvanrossum"}}