Note that frozendict is also a hashed collection that invokes the __hash__ method of objects in data model documentation #148867
Note that frozendict is also a hashed collection that invokes the __hash__ method of objects in data model documentation #148867jonathandung wants to merge 1 commit intopython:mainfrom
frozendict is also a hashed collection that invokes the __hash__ method of objects in data model documentation #148867Conversation
|
Please add skip issue. |
| advised to mix together the hash values of the components of the object that | ||
| also play a part in comparison of objects by packing them into a tuple and | ||
| hashing the tuple. Example:: | ||
| hashed collections including :class:`set`, :class:`frozenset`, :class:`dict` |
There was a problem hiding this comment.
| hashed collections including :class:`set`, :class:`frozenset`, :class:`dict` | |
| hashed collections including :class:`set`, :class:`frozenset`, :class:`dict`, |
There was a problem hiding this comment.
There was an Oxford comma here before, I think we should keep it.
ZeroIntensity
left a comment
There was a problem hiding this comment.
Please fix the Oxford comma change, per @johnslavik's suggestion, and then I'll happily merge this.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
The portion of the data model page documenting
object.__hash__currently acknowledges that besides the built-inhashfunction, 'operations on members of hashed collections includingset,frozensetanddict' would also call__hash__. That list should be expanded in light of 3.15 implementingfrozendict, which also falls into this category.📚 Documentation preview 📚: https://cpython-previews--148867.org.readthedocs.build/