Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit dc77669

Browse files
committed
Use a simple comprehension instead of map
1 parent cc9fa0f commit dc77669

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pep257.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ def __eq__(self, other):
8787
return other and vars(self) == vars(other)
8888

8989
def __repr__(self):
90-
kwargs = ', '.join(
91-
map(lambda arg: '{}={!r}'.format(arg, getattr(self, arg)),
92-
self._fields)
93-
)
90+
kwargs = ', '.join('{}={!r}'.format(field, getattr(self, field))
91+
for field in self._fields)
9492
return '{}({})'.format(self.__class__.__name__, kwargs)
9593

9694

0 commit comments

Comments
 (0)