Repository navigation
Conversation
Add tests for equality and removal of identical and non-reflexive elements in plist.
Add test for removing identical NaN values from pdeque.
Added a note about preserving element identity in PList.
Author
|
Could you take a look at this PList identity/equality fix when you have time? The regression cases cover NaN, raising comparisons and PDeque removal while preserving the original persistent values. Local compiled-extension, pure-Python and doctest results are recorded above; hosted tests still require maintainer approval. Please let me know if any changes are needed for review. Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PListdocuments standard list equality semantics, but a list containing a NaN can compare unequal to itself. The same object is found by membership/counting yet cannot be removed:Check element identity before calling equality in
PList.__eq__andPList.remove. Distinct objects still use their existing equality behavior, including exceptions. This also fixesPDeque.remove, which delegates to its persistent lists. No list conversion or change to structural sharing is needed.This is separate from #330's PMap bucket matching, #337's suffix slicing and the PDeque maxlen/slicing/rotation proposals.
Validation
git diff --check: passed.The existing Hypothesis collection warning remains. Other Python versions, PyPy, platforms and the memory-profile job were not run locally. Hosted CI results remain separate.
AI-assisted implementation and testing.