-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed
Labels
Description
See https://discuss.python.org/t/unclear-docs-for-dataclasses-field/80716. Currently the docs are:
hash: This can be a bool or None. If true, this field is included in the generated __hash__() method. If None (the default), use the value of compare: this would normally be the expected behavior. A field should be considered in the hash if it’s used for comparisons. Setting this value to anything other than None is discouraged.
We can change it to
hash: This can be a bool or None. If true, this field is included in the generated :meth:`~object.__hash__` method.
+If false, this field is excluded from the generated :meth:`~object.__hash__` method.
If :const:`None` (the default), use the value of compare: this would normally be the expected behavior.
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status
Todo