Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ def _get_field(cls, a_name, a_type, default_kw_only):
f = field(default=default)

# Only at this point do we know the name and the type. Set them.
f.name = a_name
f.name = sys.intern(a_name)
f.type = a_type

# Assume it's a normal field until proven otherwise. We're next
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Intern field names of ``dataclass`` to improve performance. Patch by Xuehai Pan.
Loading