There was an error while loading. Please reload this page.
unsafe_hash
1 parent 6214373 commit 71f5fafCopy full SHA for 71f5faf
1 file changed
Doc/library/dataclasses.rst
@@ -121,8 +121,11 @@ Module contents
121
:meth:`!__le__`, :meth:`!__gt__`, or :meth:`!__ge__`, then
122
:exc:`TypeError` is raised.
123
124
- - *unsafe_hash*: If ``False`` (the default), a :meth:`~object.__hash__` method
125
- is generated according to how *eq* and *frozen* are set.
+ - *unsafe_hash*: If true, force ``dataclasses`` to create a
+ :meth:`~object.__hash__` method, even though it may not be safe to do so.
126
+ Otherwise, generate a :meth:`~object.__hash__` method according to how
127
+ *eq* and *frozen* are set.
128
+ The default value is ``False``.
129
130
:meth:`!__hash__` is used by built-in :meth:`hash`, and when objects are
131
added to hashed collections such as dictionaries and sets. Having a
0 commit comments