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

Clean up the shallow copy #1

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

WilliamJamieson
Copy link

This is a suggestion for your spacetelescope#232 pull request.

I thought the way you had to make a shallow copy was very awkward, so I updated it so that it was less awkward. Feel free to reject, copy, or merge this suggestion.

result = self.__class__(init=None)
self.clone(result, self, deepcopy=True, memo=memo)
self.clone(result, self, deepcopy=deepcopy, memo=memo)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I think this clone vs copy thing and the clone interface are both bizarre. In reality it should just all be unified into copy. Doing that is outside the scope of the reducing copies PR, so it can wait.

@schlafly schlafly merged commit 97ccacc into schlafly:reduce-copies Jul 12, 2023
@WilliamJamieson WilliamJamieson deleted the clean_up_copy branch July 13, 2023 13:29
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.

2 participants