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

Remove unnecessary check for __deepcopy__ argument #8321

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

dmoisset
Copy link
Contributor

@dmoisset dmoisset commented Apr 7, 2017

The implementation for QueryDict..__depcopy__ accepts an optional memo argument and check that it is not None. However, according to https://docs.python.org/3.6/library/copy.html the memo argument is mandatory and you're guaranteed to always get a dict (the copy.deepcopy stdlib function takes care of ensuring this) so the check is redundant.

@rixx
Copy link
Contributor

rixx commented Apr 7, 2017

Looks good. The deepcopy interface has not changed in any of the supported python versions (or forever, really).

@timgraham timgraham merged commit 5d3b322 into django:master Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants