7 ms·
Python recently added the same thing in 3.7. They call them data classes. https://docs.python.org/3/library/dataclasses.html https://docs.python.org/3/library
by jnwatson 7y ago
Python recently added the same thing in 3.7. They call them data classes.
https://docs.python.org/3/library/dataclasses.html https://docs.python.org/3/library/dataclasses.html
- dfox 7y agoPython has had namedtuples for a long time, which is similar idea implemented less cleanly (in fact the implementation is horrible hack because of some rare corner cases) and without dependence on Py3 annotation syntax
- dehrmann 7y ago> less cleanly Python has a number of these warts. Same with classes and type annotations.