8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 219effa commit 512f299Copy full SHA for 512f299
Doc/library/dataclasses.rst
@@ -738,7 +738,7 @@ for ``x`` when creating a class instance will share the same copy
738
of ``x``. Because dataclasses just use normal Python class
739
creation they also share this behavior. There is no general way
740
for Data Classes to detect this condition. Instead, the
741
-:func:`dataclass` decorator will raise a :exc:`TypeError` if it
+:func:`dataclass` decorator will raise a :exc:`ValueError` if it
742
detects an unhashable default parameter. The assumption is that if
743
a value is unhashable, it is mutable. This is a partial solution,
744
but it does protect against many common errors.
0 commit comments