Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5da8cfb8
Commit
5da8cfb8
authored
Mar 01, 2018
by
Eric V. Smith
Committed by
GitHub
Mar 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed incorrect default value for dataclass unsafe_hash. (GH-5949)
parent
3e197c7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Lib/dataclasses.py
Lib/dataclasses.py
+2
-2
No files found.
Lib/dataclasses.py
View file @
5da8cfb8
...
...
@@ -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
=
Non
e
,
frozen
=
False
):
unsafe_hash
=
Fals
e
,
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
=
Non
e
,
repr
=
True
,
eq
=
True
,
order
=
False
,
unsafe_hash
=
Fals
e
,
frozen
=
False
):
"""Return a new dynamically created dataclass.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment