diff options
author | Eric V. Smith <ericvsmith@users.noreply.github.com> | 2018-03-01 08:01:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-01 08:01:41 -0500 |
commit | 5da8cfb838fa1bf3529c085c6dce1adf3d1eaf62 (patch) | |
tree | e80d47e1be5eccaf43d2be7110b5e32194d6a183 /Lib/dataclasses.py | |
parent | bpo-32903: Fix a memory leak in os.chdir() on Windows (GH-5801) (diff) | |
download | cpython-5da8cfb838fa1bf3529c085c6dce1adf3d1eaf62.tar.gz cpython-5da8cfb838fa1bf3529c085c6dce1adf3d1eaf62.tar.bz2 cpython-5da8cfb838fa1bf3529c085c6dce1adf3d1eaf62.zip |
Fixed incorrect default value for dataclass unsafe_hash. (GH-5949)
Diffstat (limited to 'Lib/dataclasses.py')
-rw-r--r-- | Lib/dataclasses.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py index 54478fec93d..b55a497db30 100644 --- a/Lib/dataclasses.py +++ b/Lib/dataclasses.py @@ -745,7 +745,7 @@ def _process_class(cls, repr, eq, order, unsafe_hash, init, frozen): # underscore. The presence of _cls is used to detect if this # decorator is being called with parameters or not. def dataclass(_cls=None, *, init=True, repr=True, eq=True, order=False, - unsafe_hash=None, frozen=False): + unsafe_hash=False, frozen=False): """Returns the same class as was passed in, with dunder methods added based on the fields defined in the class. @@ -880,7 +880,7 @@ def _astuple_inner(obj, tuple_factory): def make_dataclass(cls_name, fields, *, bases=(), namespace=None, init=True, - repr=True, eq=True, order=False, unsafe_hash=None, + repr=True, eq=True, order=False, unsafe_hash=False, frozen=False): """Return a new dynamically created dataclass. |