Title: dict(zip()) and itertools.product · Issue #3884 · python/mypy · GitHub
Open Graph Title: dict(zip()) and itertools.product · Issue #3884 · python/mypy
X Title: dict(zip()) and itertools.product · Issue #3884 · python/mypy
Description: I think I've noticed a tiny bug. Python 3.6.1 mypy 0.521 from typing import Tuple, Dict from itertools import product # works fine XY_1: Dict[str, Tuple[int, int]] = dict(zip('abcd', product(range(2), range(2)))) # {'a': (0, 0), 'b': (0,...
Open Graph Description: I think I've noticed a tiny bug. Python 3.6.1 mypy 0.521 from typing import Tuple, Dict from itertools import product # works fine XY_1: Dict[str, Tuple[int, int]] = dict(zip('abcd', product(range(...
X Description: I think I've noticed a tiny bug. Python 3.6.1 mypy 0.521 from typing import Tuple, Dict from itertools import product # works fine XY_1: Dict[str, Tuple[int, int]] = dict(zip('abcd', pr...
Opengraph URL: https://github.com/python/mypy/issues/3884
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"dict(zip()) and itertools.product","articleBody":"I think I've noticed a tiny bug.\r\nPython 3.6.1\r\nmypy 0.521\r\n\r\n````\r\nfrom typing import Tuple, Dict\r\nfrom itertools import product\r\n\r\n# works fine\r\nXY_1: Dict[str, Tuple[int, int]] = dict(zip('abcd', product(range(2), range(2))))\r\n# {'a': (0, 0), 'b': (0, 1), 'c': (1, 0), 'd': (1, 1)}\r\n\r\n# error for this one\r\nXY_2: Dict[str, Tuple[int, int]] = dict(zip('abcd', product(range(2), repeat=2)))\r\n# {'a': (0, 0), 'b': (0, 1), 'c': (1, 0), 'd': (1, 1)}\r\n````\r\nThe dictionaries are the same.\r\nError output:\r\n\r\n> mypy_test.py:10: error: Argument 2 to \"zip\" has incompatible type Iterator[Tuple[int]]; expected Iterable[Tuple[int, int]]\r\n\r\nI think that this is not essential. So, just in case.\r\nThanks for the great product!","author":{"url":"https://github.com/AndreyBalandin","@type":"Person","name":"AndreyBalandin"},"datePublished":"2017-08-29T09:42:36Z","url":"https://github.com/python/mypy/issues/3884"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:99f17db8-f52a-ad48-47ee-2b5257b5fde1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA02:302FC:4FCD18:6ACE13:6B002F3B |
| html-safe-nonce | 463543d05bc363870c8f84b120ab4396a19966f7d4f5ed035d0e22e20bd2b146 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTAyOjMwMkZDOjRGQ0QxODo2QUNFMTM6NkIwMDJGM0IiLCJ2aXNpdG9yX2lkIjoiNDc0NTAwMzE0OTQxNTE2NTc1NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ebd2ca443c3d519cb8cdbd106579063fae4ffba02a6f7a25db9e294548588115 |
| hovercard-subject-tag | issue:253591551 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/3884/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c2e09b5f2f1072e6d8c3edc4bd1f189ef795819960ab7516a1a856049da649fd/python/mypy/issues/3884 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c2e09b5f2f1072e6d8c3edc4bd1f189ef795819960ab7516a1a856049da649fd/python/mypy/issues/3884 |
| og:image:alt | I think I've noticed a tiny bug. Python 3.6.1 mypy 0.521 from typing import Tuple, Dict from itertools import product # works fine XY_1: Dict[str, Tuple[int, int]] = dict(zip('abcd', product(range(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AndreyBalandin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width