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 extra useless parameter from RationalTime.__copy__ method #1198

Conversation

JeanChristopheMorinPerso
Copy link
Member

I noticed that the RationalTime.__copy__ method had an argument that is not used. The __copy__ special method is not supposed to accept arguments.

From https://docs.python.org/3/library/copy.html:

In order for a class to define its own copy implementation, it can define special methods __copy__() and __deepcopy__(). The former is called to implement the shallow copy operation; no additional arguments are passed. The latter is called to implement the deep copy operation; it is passed one argument, the memo dictionary.

@jminor
Copy link
Collaborator

jminor commented Jan 21, 2022

Does __deepcopy__ have the same issue?
(edit) never mind, I see that the optional "memo" argument.

@jminor jminor self-requested a review January 21, 2022 22:59
@meshula meshula merged commit d1e9c08 into AcademySoftwareFoundation:main Jan 21, 2022
@JeanChristopheMorinPerso JeanChristopheMorinPerso deleted the remove_useless_param_in_copy branch February 5, 2022 19:34
@ssteinbach ssteinbach added this to the Public Beta 15 milestone Sep 19, 2022
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.

4 participants