commit | b01786c8812c4cc24dd561b5941025bdd6f444c0 | [log] [tgz] |
---|---|---|
author | Christopher Hunt <chrahunt@gmail.com> | Tue Feb 12 06:50:49 2019 -0500 |
committer | Eric V. Smith <ericvsmith@users.noreply.github.com> | Tue Feb 12 06:50:49 2019 -0500 |
tree | 7ce684adbbc729ae848b7190a87631ed9d92ef14 | |
parent | a31f4cc881992e84d351957bd9ac1a92f882fa39 [diff] [blame] |
bpo-35960: Fix dataclasses.field throwing away empty metadata. (GH-11815)
diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py index 71d9896..325b822 100644 --- a/Lib/dataclasses.py +++ b/Lib/dataclasses.py
@@ -241,7 +241,7 @@ self.hash = hash self.compare = compare self.metadata = (_EMPTY_METADATA - if metadata is None or len(metadata) == 0 else + if metadata is None else types.MappingProxyType(metadata)) self._field_type = None