Skip to content

Commit 5da8cfb

Browse files
authored
Fixed incorrect default value for dataclass unsafe_hash. (GH-5949)
1 parent 3e197c7 commit 5da8cfb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/dataclasses.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ def _process_class(cls, repr, eq, order, unsafe_hash, init, frozen):
745745
# underscore. The presence of _cls is used to detect if this
746746
# decorator is being called with parameters or not.
747747
def dataclass(_cls=None, *, init=True, repr=True, eq=True, order=False,
748-
unsafe_hash=None, frozen=False):
748+
unsafe_hash=False, frozen=False):
749749
"""Returns the same class as was passed in, with dunder methods
750750
added based on the fields defined in the class.
751751
@@ -880,7 +880,7 @@ def _astuple_inner(obj, tuple_factory):
880880

881881

882882
def make_dataclass(cls_name, fields, *, bases=(), namespace=None, init=True,
883-
repr=True, eq=True, order=False, unsafe_hash=None,
883+
repr=True, eq=True, order=False, unsafe_hash=False,
884884
frozen=False):
885885
"""Return a new dynamically created dataclass.
886886

0 commit comments

Comments
 (0)