I agree with the article that dataclasses and namedtuples aren’t as good as they can be. But I think the solution should be to make dataclasses native, and not namedtuples.
So we could write something like:
dataclass Point:
x: int @"why not also add new syntax for documentation?"
y: int @"the size of translation on the Y axis"defmethods_as_usual(self):
...
I agree with the article that dataclasses and namedtuples aren’t as good as they can be. But I think the solution should be to make dataclasses native, and not namedtuples.
So we could write something like:
dataclass Point: x: int @"why not also add new syntax for documentation?" y: int @"the size of translation on the Y axis" def methods_as_usual(self): ...