Sitelet https://web.archive.org/web/20201229115858/https://github.com/fluentpython/example-code/issues/21
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to maintain keys in TransformDict? #21

Open
oldman1991 opened this issue Jun 11, 2018 · 0 comments
Open

How to maintain keys in TransformDict? #21

oldman1991 opened this issue Jun 11, 2018 · 0 comments

Comments

@oldman1991
Copy link

@oldman1991 oldman1991 commented Jun 11, 2018 •

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.