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
Make dict views copyable #71439
Comments
Proposed patch adds support of dict views in the copy module. Since dict views are immutable, copy.copy() just returns the same object. copy.deepcopy() returns a frozenset for the dict_keys object, a tuple for the dict_values object, and a dict_items object for the dict_items object. Only needed data is copied (keys for dict_keys, values for dict_values). |
I'm still not clear about the use case -- have you heard from people who had to work around the current situation? Use of the copy module is often a code smell in my experience, so I don't want to encourage it. |
I didn't encounter this. |
I think we should stop adding features like this without actual user requests and real use cases to show necessity and to inform the design. |
See also: http://bugs.python.org/issue27253 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: