[Python-Dev] PEP 557: Data Classes
Eric V. Smith
eric at trueblade.com
Mon Sep 11 08:26:33 EDT 2017
On 9/10/17 10:27 PM, Raymond Hettinger wrote:
>> On Sep 10, 2017, at 4:54 PM, Eric V. Smith <eric at trueblade.com> wrote:
>> And now I've pushed a version that works with Python 3.6 to PyPI at https://pypi.python.org/pypi/dataclasses
>> It implements the PEP as it currently stands. I'll be making some tweaks in the coming weeks. Feedback is welcomed.
>> The repo is at https://github.com/ericvsmith/dataclasses
> Overall, this looks very well thought out.
> Nice work!
> Once you get agreement on the functionality, name bike-shedding will likely be next. In a way, all classes are data classes so that name doesn't tell me much. Instead, it would be nice to have something suggestive of what it actually does which is automatically adding boilerplate methods to a general purpose class. Perhaps, @boilerplate or @autoinit or some such.
There was some discussion on naming at
In that issue, Guido said use Data Classes (the concept), dataclasses
(the module) and dataclass (the decorator). I think if someone came up
with an awesomely better name, we could all be convinced to use it. But
so far, nothing's better.
More information about the Python-Dev