ericvsmith / dataclasses

Apache License 2.0
587 stars 53 forks source link

Spaces in repr #47

Closed Drekin closed 7 years ago

Drekin commented 7 years ago

It's a tiny issue, but shouldn't there be spaces after commas in the generated reprs, i.e. Point(x=1, y=2) instead of Point(x=1,y=2)?

ilevkivskyi commented 7 years ago

+1 for space, it looks nicer, and more like one would write under PEP 8.

ericvsmith commented 7 years ago

I was omitting the spaces because I thought that's what namedtuples do, but I'm wrong:

>>> from collections import namedtuple
>>> namedtuple('T', 'x y z')(1, 2, 3)
T(x=1, y=2, z=3)

I'll put the spaces in.