Title: Handling sets in cmp for dict view types · Issue #3298 · RustPython/RustPython · GitHub
Open Graph Title: Handling sets in cmp for dict view types · Issue #3298 · RustPython/RustPython
X Title: Handling sets in cmp for dict view types · Issue #3298 · RustPython/RustPython
Description: Currently, sets are not handled in comparisons with dict views: In Python: >>> d = {1: 2} >>> d.keys() == set([1]) True while in RustPython: >>>>> d = {1: 2} >>>>> d.keys() == set([1]) False In CPython, the corresponding implementation (...
Open Graph Description: Currently, sets are not handled in comparisons with dict views: In Python: >>> d = {1: 2} >>> d.keys() == set([1]) True while in RustPython: >>>>> d = {1: 2} >>>>> d.keys() == set([1]) False In CPy...
X Description: Currently, sets are not handled in comparisons with dict views: In Python: >>> d = {1: 2} >>> d.keys() == set([1]) True while in RustPython: >>>>> d = {1: 2} >&g...
Opengraph URL: https://github.com/RustPython/RustPython/issues/3298
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Handling sets in cmp for dict view types","articleBody":"Currently, sets are not handled in comparisons with dict views:\r\n\r\nIn Python:\r\n\r\n```python\r\n\u003e\u003e\u003e d = {1: 2}\r\n\u003e\u003e\u003e d.keys() == set([1])\r\nTrue\r\n```\r\n\r\nwhile in RustPython:\r\n\r\n```python\r\n\u003e\u003e\u003e\u003e\u003e d = {1: 2}\r\n\u003e\u003e\u003e\u003e\u003e d.keys() == set([1])\r\nFalse\r\n```\r\n\r\nIn CPython, the corresponding implementation (`dictview_richcompare`) calls another function that iterates through the view and continuously calls `__contains__` on the other object (see `all_contained_in` function).","author":{"url":"https://github.com/DimitrisJim","@type":"Person","name":"DimitrisJim"},"datePublished":"2021-10-14T12:00:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/3298/RustPython/issues/3298"}
| 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:a2c4bd10-0b8e-82ca-d7a8-4f1785dcfbe3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E5F6:2E0756:2488BE:2F6EC4:696B3A2D |
| html-safe-nonce | 9ce33422d5374e9e5735ab418eeff0cd7566fdf61fe5522fe1638f79f76b3172 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUY2OjJFMDc1NjoyNDg4QkU6MkY2RUM0OjY5NkIzQTJEIiwidmlzaXRvcl9pZCI6IjczMjIxMDY0MTAyOTc5MzIzMzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b4f76ab6cad499fa58d3ad5918d4603ba692afde211b164b5650fe529990f651 |
| hovercard-subject-tag | issue:1026310270 |
| 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/RustPython/RustPython/3298/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2d06ee8995465435dc3eb7f6aa88b79b5d0ae036637b126517234df66b2f5970/RustPython/RustPython/issues/3298 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2d06ee8995465435dc3eb7f6aa88b79b5d0ae036637b126517234df66b2f5970/RustPython/RustPython/issues/3298 |
| og:image:alt | Currently, sets are not handled in comparisons with dict views: In Python: >>> d = {1: 2} >>> d.keys() == set([1]) True while in RustPython: >>>>> d = {1: 2} >>>>> d.keys() == set([1]) False In CPy... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DimitrisJim |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width