Title: Annotations for `set.__sub__` and related methods are inconsistent · Issue #9004 · python/typeshed · GitHub
Open Graph Title: Annotations for `set.__sub__` and related methods are inconsistent · Issue #9004 · python/typeshed
X Title: Annotations for `set.__sub__` and related methods are inconsistent · Issue #9004 · python/typeshed
Description: According to the documentation s1 - s2 returns the set of all elements that are in s1 but not in s2. So what's the point of constraining s2 elements type? I believe the correct annotation for the argument of set.__sub__ would be Abstract...
Open Graph Description: According to the documentation s1 - s2 returns the set of all elements that are in s1 but not in s2. So what's the point of constraining s2 elements type? I believe the correct annotation for the a...
X Description: According to the documentation s1 - s2 returns the set of all elements that are in s1 but not in s2. So what's the point of constraining s2 elements type? I believe the correct annotation for t...
Opengraph URL: https://github.com/python/typeshed/issues/9004
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Annotations for `set.__sub__` and related methods are inconsistent","articleBody":"According to the documentation `s1 - s2` returns the set of all elements that are in `s1` but not in `s2`. So what's the point of constraining `s2` elements type? I believe the correct annotation for the argument of `set.__sub__` would be `AbstractSet[object]` rather than `AbstractSet[T | None]`.\r\n\r\nhttps://github.com/python/typeshed/blob/cf9bdc2d9861cb61e76b512988d19afe232a958f/stdlib/builtins.pyi#L1100","author":{"url":"https://github.com/LeeeeT","@type":"Person","name":"LeeeeT"},"datePublished":"2022-10-27T16:44:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":18},"url":"https://github.com/9004/typeshed/issues/9004"}
| 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:ed109572-1bc2-6f1b-fb59-2b2f650108ff |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B128:162B3B:10D747A:17160A8:6A62DB03 |
| html-safe-nonce | 03f03f64069c1f7a6e5d02cbc78e35f316e4230a8e03268e75267144c8873335 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTI4OjE2MkIzQjoxMEQ3NDdBOjE3MTYwQTg6NkE2MkRCMDMiLCJ2aXNpdG9yX2lkIjoiNDQxNDQ2MTEzNDg2NDgzMzI4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 71f149aa5c87bf1d8a64900e6cfbeb52a318a776588eba3a6015a2eb9f969b0c |
| hovercard-subject-tag | issue:1425944153 |
| 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/typeshed/9004/issue_layout |
| twitter:image | https://opengraph.githubassets.com/324d495b794e6de5321faa8f8ba2957f37980e7ddc7860ebffa6520ed77058bd/python/typeshed/issues/9004 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/324d495b794e6de5321faa8f8ba2957f37980e7ddc7860ebffa6520ed77058bd/python/typeshed/issues/9004 |
| og:image:alt | According to the documentation s1 - s2 returns the set of all elements that are in s1 but not in s2. So what's the point of constraining s2 elements type? I believe the correct annotation for the a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LeeeeT |
| hostname | github.com |
| expected-hostname | github.com |
| None | df33b1b61ee7b9a0af988199bfc3503c9c1acafb1f1d40e1f140ea7c84f890dd |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| 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 | d41cd1bdb290013455c0ac430fa755621733f5eb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width