{"action":"created","issue":{"url":"https://api.github.com/repos/python/mypy/issues/1578","repository_url":"https://api.github.com/repos/python/mypy","labels_url":"https://api.github.com/repos/python/mypy/issues/1578/labels{/name}","comments_url":"https://api.github.com/repos/python/mypy/issues/1578/comments","events_url":"https://api.github.com/repos/python/mypy/issues/1578/events","html_url":"https://github.com/python/mypy/issues/1578","id":156750952,"number":1578,"title":"Explicit List of Tuple do not support __setitem__ with index","user":{"login":"tharvik","id":5735566,"avatar_url":"https://avatars.githubusercontent.com/u/5735566?v=3","gravatar_id":"","url":"https://api.github.com/users/tharvik","html_url":"https://github.com/tharvik","followers_url":"https://api.github.com/users/tharvik/followers","following_url":"https://api.github.com/users/tharvik/following{/other_user}","gists_url":"https://api.github.com/users/tharvik/gists{/gist_id}","starred_url":"https://api.github.com/users/tharvik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tharvik/subscriptions","organizations_url":"https://api.github.com/users/tharvik/orgs","repos_url":"https://api.github.com/users/tharvik/repos","events_url":"https://api.github.com/users/tharvik/events{/privacy}","received_events_url":"https://api.github.com/users/tharvik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-25T13:29:08Z","updated_at":"2016-06-02T19:42:45Z","closed_at":"2016-06-02T19:42:45Z","body":"```python\r\nfrom typing import List, Tuple\r\n\r\nl = []  # type: List[Tuple[int, int]]\r\nl.append((1, 2))\r\n\r\nl[0] = 3, 4\r\nl[:] = [(5, 6)]\r\n```\r\n\r\ngives\r\n\r\n```\r\nasd.py:6: error: No overload variant of \"__setitem__\" of \"list\" matches argument types [builtins.int, Tuple[builtins.int, builtins.int]]\r\n```\r\nso `__setitem__` with slice works but not with index.\r\n\r\nNot specifing the type does work (it is just an example, the code I'm working on need to explicit a specific variable).\r\n\r\n--\r\n\r\nI don't think it is an issue in typeshed as playing with builtins.list do not change a thing.\r\nbtw, simply exchanging the `@overload  __setitem__` gives me weirder errors, like\r\n```\r\nasd.py:1: note: In module imported here:\r\n/home/tharvik/mypy/typeshed/stdlib/3/builtins.pyi: note: In class \"list\":\r\n/home/tharvik/mypy/typeshed/stdlib/3/builtins.pyi:477: error: Signature of \"__setitem__\" incompatible with supertype \"MutableSequence\"\r\nasd.py: note: At top level:\r\nasd.py:6: error: No overload variant of \"__setitem__\" of \"list\" matches argument types [builtins.int, Tuple[builtins.int, builtins.int]]\r\n```\r\nThe order shouldn't matter, right? (I didn't see it written in the PEP anyway)"},"comment":{"url":"https://api.github.com/repos/python/mypy/issues/comments/223400281","html_url":"https://github.com/python/mypy/issues/1578#issuecomment-223400281","issue_url":"https://api.github.com/repos/python/mypy/issues/1578","id":223400281,"user":{"login":"rwbarton","id":22628,"avatar_url":"https://avatars.githubusercontent.com/u/22628?v=3","gravatar_id":"","url":"https://api.github.com/users/rwbarton","html_url":"https://github.com/rwbarton","followers_url":"https://api.github.com/users/rwbarton/followers","following_url":"https://api.github.com/users/rwbarton/following{/other_user}","gists_url":"https://api.github.com/users/rwbarton/gists{/gist_id}","starred_url":"https://api.github.com/users/rwbarton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwbarton/subscriptions","organizations_url":"https://api.github.com/users/rwbarton/orgs","repos_url":"https://api.github.com/users/rwbarton/repos","events_url":"https://api.github.com/users/rwbarton/events{/privacy}","received_events_url":"https://api.github.com/users/rwbarton/received_events","type":"User","site_admin":false},"created_at":"2016-06-02T19:42:45Z","updated_at":"2016-06-02T19:42:45Z","body":"This has been fixed by #1596."}}
{"actor":{"display_login":"rwbarton"}}