diff options
author | Christopher Hunt <chrahunt@gmail.com> | 2019-02-12 11:50:49 (GMT) |
---|---|---|
committer | Eric V. Smith <ericvsmith@users.noreply.github.com> | 2019-02-12 11:50:49 (GMT) |
commit | b01786c8812c4cc24dd561b5941025bdd6f444c0 (patch) | |
tree | 7ce684adbbc729ae848b7190a87631ed9d92ef14 /Lib/dataclasses.py | |
parent | a31f4cc881992e84d351957bd9ac1a92f882fa39 (diff) | |
download | cpython-b01786c8812c4cc24dd561b5941025bdd6f444c0.zip cpython-b01786c8812c4cc24dd561b5941025bdd6f444c0.tar.gz cpython-b01786c8812c4cc24dd561b5941025bdd6f444c0.tar.bz2 |
bpo-35960: Fix dataclasses.field throwing away empty metadata. (GH-11815)
Diffstat (limited to 'Lib/dataclasses.py')
-rw-r--r-- | Lib/dataclasses.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ class Field: 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 |