Story time
When I go on vacation with a fellow Python developer, inevitably I will talk about Python. ๐ Back in September, Andrea and I drove the Cabot Trail with our friends Dusty and Jen, which led to a discussion about the match statement and how Dusty and I both wished
I'm still digesting this one and haven't formed any strong opinions yet.
I've had problems in the past where this could have been useful, like ingesting millions of lat/long positions and trying to string them together in a "trail". But, I was still able to handle that fine with namedtuple without too much pain.
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):
...