Title: bool/float treated inconsistently with bool/int and int/float, causing inconsistent Union simplification · Issue #1850 · python/mypy · GitHub
Open Graph Title: bool/float treated inconsistently with bool/int and int/float, causing inconsistent Union simplification · Issue #1850 · python/mypy
X Title: bool/float treated inconsistently with bool/int and int/float, causing inconsistent Union simplification · Issue #1850 · python/mypy
Description: l = [] # type: List[Union[bool, int, float]] causes "error: Incompatible types in assignment (expression has type List[float], variable has type List[Union[bool, int, float]])" I also tried l1 = [] # type: List[Union[bool, int]] l2 = [] ...
Open Graph Description: l = [] # type: List[Union[bool, int, float]] causes "error: Incompatible types in assignment (expression has type List[float], variable has type List[Union[bool, int, float]])" I also tried l1 = []...
X Description: l = [] # type: List[Union[bool, int, float]] causes "error: Incompatible types in assignment (expression has type List[float], variable has type List[Union[bool, int, float]])" I also tri...
Opengraph URL: https://github.com/python/mypy/issues/1850
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bool/float treated inconsistently with bool/int and int/float, causing inconsistent Union simplification","articleBody":"`l = [] # type: List[Union[bool, int, float]]`\ncauses \"error: Incompatible types in assignment (expression has type List[float], variable has type List[Union[bool, int, float]])\"\n\nI also tried\n\n```\nl1 = [] # type: List[Union[bool, int]]\nl2 = [] # type: List[Union[bool, float]]\nl3 = [] # type: List[Union[int, float]]\nx = True # type: Union[bool, int, float]\n```\n\nand they all pass.\n","author":{"url":"https://github.com/ajprax","@type":"Person","name":"ajprax"},"datePublished":"2016-07-12T23:32:57Z","url":"https://github.com/python/mypy/issues/1850"}
| 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:393e9cb6-77e1-c0ad-f966-9256a69dfdce |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 94E0:1914F5:1362A65:19529F0:6B0005F0 |
| html-safe-nonce | a660eba0551ed5ada52ea35fe96289538eb89d612b9a83390c2fb2bc03a437f3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEUwOjE5MTRGNToxMzYyQTY1OjE5NTI5RjA6NkIwMDA1RjAiLCJ2aXNpdG9yX2lkIjoiMTgxODIzODI4NTg4MTgwNDI3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 22c2da00234cc2dfbb00cadb1f47206538db12544f296993b4b0c296247acee6 |
| hovercard-subject-tag | issue:165204860 |
| 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/1850/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7b0cee3c4a083bf7172e988b4aa01b5405aef5d53e996329a6dbac31d6bbef49/python/mypy/issues/1850 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7b0cee3c4a083bf7172e988b4aa01b5405aef5d53e996329a6dbac31d6bbef49/python/mypy/issues/1850 |
| og:image:alt | l = [] # type: List[Union[bool, int, float]] causes "error: Incompatible types in assignment (expression has type List[float], variable has type List[Union[bool, int, float]])" I also tried l1 = []... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ajprax |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| 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 | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width