diff options
| author | Christopher Hunt <chrahunt@gmail.com> | 2019-02-12 06:50:49 -0500 |
|---|---|---|
| committer | Eric V. Smith <ericvsmith@users.noreply.github.com> | 2019-02-12 06:50:49 -0500 |
| commit | b01786c8812c4cc24dd561b5941025bdd6f444c0 (patch) | |
| tree | 7ce684adbbc729ae848b7190a87631ed9d92ef14 /Lib/dataclasses.py | |
| parent | a31f4cc881992e84d351957bd9ac1a92f882fa39 (diff) | |
| download | cpython-git-b01786c8812c4cc24dd561b5941025bdd6f444c0.tar.gz | |
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 71d9896a10..325b822d9f 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 |
