bpo-33494: Change dataclasses.Fields repr to use the repr of each of its members (GH-6798)

This commit is contained in:
Eric V. Smith 2018-05-14 11:37:28 -04:00 committed by GitHub
parent 7ffd4c58fa
commit 2473eea65d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 8 deletions

View file

@ -230,14 +230,14 @@ class Field:
def __repr__(self):
return ('Field('
f'name={self.name!r},'
f'type={self.type},'
f'default={self.default},'
f'default_factory={self.default_factory},'
f'init={self.init},'
f'repr={self.repr},'
f'hash={self.hash},'
f'compare={self.compare},'
f'metadata={self.metadata}'
f'type={self.type!r},'
f'default={self.default!r},'
f'default_factory={self.default_factory!r},'
f'init={self.init!r},'
f'repr={self.repr!r},'
f'hash={self.hash!r},'
f'compare={self.compare!r},'
f'metadata={self.metadata!r}'
')')
# This is used to support the PEP 487 __set_name__ protocol in the