-
Notifications
You must be signed in to change notification settings - Fork 71
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
Support copy, deepcopy, eq on types #99
Conversation
Looks good. Just need python tests on the types with the new impls. Document, Facet and SearchResult right? |
I just realized that marking classes as |
Since immutability is highly desirable for both performance and correctness, especially in a language like Python built around pervasive shared mutability, I would recommend not dropping it easily to implement the Pickle protocol. (PyO3 is even planning to make frozen classes the default eventually due to this.) Maybe we can use #96 to take a step back and reconsider why Pickle support was requested? Is full integration with the Pickle protocol necessary or only (de-)serialization from |
I was able to accomplish pickling with This change is okay regardless. |
2a2fca0
to
295745e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good to move forward, but I'd like to get feedback from @adamreichold too before I merge.
This change implements the
__richcmp__
,__copy__()
and__deepcopy__()
functions for certain types that can be copied and compared.