this post was submitted on 14 Jun 2023
4 points (100.0% liked)

Python

6281 readers
85 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
 

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.

Thoughts?

you are viewing a single comment's thread
view the rest of the comments
[–] lightsecond@lemmy.world 1 points 1 year ago

I’m not a fan of introducing yet another “type of class”.

In my humble opinion, if we do introduce rust-like match it should work on top of the existing concepts of dataclass, namedtuples, and union-types to avoid confusion on when to use which mechanism.

Also, type hints aren’t compulsory, but they are so damn useful that I’d be okay if some features only worked when the original variables had type hints.