Title: List concat with different types causes error · Issue #720 · python/mypy · GitHub
Open Graph Title: List concat with different types causes error · Issue #720 · python/mypy
X Title: List concat with different types causes error · Issue #720 · python/mypy
Description: When I run mypy on this code: from typing import List, Any def f(a: List[int], b: List[str]): return a+b f([1,2,3], ["3","4","5"]) I get this error: /home/georgeatmit/type1.py: note: In function "f": /home/georgeatmit/type1.py:3: error: ...
Open Graph Description: When I run mypy on this code: from typing import List, Any def f(a: List[int], b: List[str]): return a+b f([1,2,3], ["3","4","5"]) I get this error: /home/georgeatmit/type1.py: note: In function "f...
X Description: When I run mypy on this code: from typing import List, Any def f(a: List[int], b: List[str]): return a+b f([1,2,3], ["3","4","5"]) I get this error: /home/georgeatmit/...
Opengraph URL: https://github.com/python/mypy/issues/720
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"List concat with different types causes error","articleBody":"When I run mypy on this code:\n\n```\nfrom typing import List, Any\n\ndef f(a: List[int], b: List[str]):\n return a+b\n\nf([1,2,3], [\"3\",\"4\",\"5\"])\n```\n\nI get this error:\n /home/georgeatmit/type1.py: note: In function \"f\":\n /home/georgeatmit/type1.py:3: error: Unsupported operand types for + (\"list\" and List[str])\n\nIs combining lists of different types supported at the moment?\n","author":{"url":"https://github.com/noisecapella","@type":"Person","name":"noisecapella"},"datePublished":"2015-07-08T00:22:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/720/mypy/issues/720"}
| 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:6a1b349e-8145-032c-c820-1ee88f4eee1e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A22A:24CBE8:11847D9:186CCCF:6A61BC6F |
| html-safe-nonce | 412b614cb30fcde9de52c04844629a4179ced0e1cb5e8adc37515cb260a58902 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjJBOjI0Q0JFODoxMTg0N0Q5OjE4NkNDQ0Y6NkE2MUJDNkYiLCJ2aXNpdG9yX2lkIjoiMTk1MjY2NzU1Mzg5NTY2MDY1NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6643322d77e36d80658d3f1a2ac7e8a83121e93b76c5c86781b9388f97e4d790 |
| hovercard-subject-tag | issue:93659403 |
| 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/720/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8482ada3b3e29ae4776a9bcfed173b15bb99d18d97196afab8edcb31baef7478/python/mypy/issues/720 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8482ada3b3e29ae4776a9bcfed173b15bb99d18d97196afab8edcb31baef7478/python/mypy/issues/720 |
| og:image:alt | When I run mypy on this code: from typing import List, Any def f(a: List[int], b: List[str]): return a+b f([1,2,3], ["3","4","5"]) I get this error: /home/georgeatmit/type1.py: note: In function "f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | noisecapella |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6f4633bcf01c1ad14b73fd07dd39ac31d61f3d3c2578ee08ec1792b7b351eeb9 |
| 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 | ac296ae7f21856f1f92adbad22f870b6fbb4b907 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width