Title: How to maintain keys in TransformDict? · Issue #21 · fluentpython/example-code · GitHub
Open Graph Title: How to maintain keys in TransformDict? · Issue #21 · fluentpython/example-code
X Title: How to maintain keys in TransformDict? · Issue #21 · fluentpython/example-code
Description: I see the demo: ''' >>> d = TransformDict(str.lower) >>> d['Foo'] = 5 >>> d['foo'] == d['FOO'] == d['Foo'] == 5 True >>> set(d.keys()) {'Foo'} ''' but , i dont know the object how to maintain the keys. thanks
Open Graph Description: I see the demo: ''' >>> d = TransformDict(str.lower) >>> d['Foo'] = 5 >>> d['foo'] == d['FOO'] == d['Foo'] == 5 True >>> set(d.keys()) {'Foo'} ''' but , i dont know the object how to maintain the k...
X Description: I see the demo: ''' >>> d = TransformDict(str.lower) >>> d['Foo'] = 5 >>> d['foo'] == d['FOO'] == d['Foo'] == 5 True >>&...
Opengraph URL: https://github.com/fluentpython/example-code/issues/21
X: @github
Domain: redirect.github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":" How to maintain keys in TransformDict?","articleBody":"I see the demo:\r\n'''\r\n \u003e\u003e\u003e d = TransformDict(str.lower)\r\n \u003e\u003e\u003e d['Foo'] = 5\r\n \u003e\u003e\u003e d['foo'] == d['FOO'] == d['Foo'] == 5\r\n True\r\n \u003e\u003e\u003e set(d.keys())\r\n {'Foo'}\r\n'''\r\nbut , i dont know the object how to maintain the keys.\r\nthanks\r\n","author":{"url":"https://github.com/oldman1991","@type":"Person","name":"oldman1991"},"datePublished":"2018-06-11T03:10:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/21/example-code/issues/21"}
| 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:41eaed9c-cba6-474a-8d8b-de67da29ce3e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9B7C:178919:944616B:C4D6BC4:696E0602 |
| html-safe-nonce | 962dbc96959bd8a2c840f096b0a3ac7078eed91445b6ae7490e9c4443885ca39 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjdDOjE3ODkxOTo5NDQ2MTZCOkM0RDZCQzQ6Njk2RTA2MDIiLCJ2aXNpdG9yX2lkIjoiODc3MTE4MTc2MjY4ODQ1MjA5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c31a594c5aeaa6293f1c1b6df384ac19f718527dfcb79177229a1a161138c75e |
| hovercard-subject-tag | issue:331032474 |
| 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/fluentpython/example-code/21/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8d80a039a39b63d7e2662a50c332f1ec0699fdef4245687f2274d0913b60455c/fluentpython/example-code/issues/21 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8d80a039a39b63d7e2662a50c332f1ec0699fdef4245687f2274d0913b60455c/fluentpython/example-code/issues/21 |
| og:image:alt | I see the demo: ''' >>> d = TransformDict(str.lower) >>> d['Foo'] = 5 >>> d['foo'] == d['FOO'] == d['Foo'] == 5 True >>> set(d.keys()) {'Foo'} ''' but , i dont know the object how to maintain the k... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | oldman1991 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9b5131b207ddd175abf059a848d5f4302ec0606b02211b989013be49cf08593e |
| turbo-cache-control | no-preview |
| go-import | github.com/fluentpython/example-code git https://github.com/fluentpython/example-code.git |
| octolytics-dimension-user_id | 9216311 |
| octolytics-dimension-user_login | fluentpython |
| octolytics-dimension-repository_id | 25216588 |
| octolytics-dimension-repository_nwo | fluentpython/example-code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 25216588 |
| octolytics-dimension-repository_network_root_nwo | fluentpython/example-code |
| 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 | f8590a63bfc8093b241930ca57d536c9a50f9680 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width