Python Data Classes Are AMAZING! Here's Why
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Related videos
How to learn Python coding fast - Step by step roadmap
Tech With Tim
31.7k views
Build & Deploy a Python AI Agent in 20 Minutes
Tech With Tim
38.6k views
These Tools Changed My Python Workflow
Tech With Tim
31.2k views
Build a Python AI Agent in 10 Minutes
Tech With Tim
84.2k views
How to Write Production Python Code
Tech With Tim
63.1k views
How to Build AI Agents in Python
Tech With Tim
46.7k views
Python is Changing β Hereβs Whatβs Coming
Tech With Tim
165.5k views
How to Build an Advanced AI Agent with Search (LangGraph, Python, Bright Data & More)
Tech With Tim
44.4k views
The Next Step After Learning Python Basics
Tech With Tim
107.8k views
Build ANYTHING With an Advanced MCP Server (Python, Authentication, Databases & More)
Tech With Tim
70.5k views
Top Comments (10)
To learn programming and Python - check out Datacamp! π» Learn Python - https://datacamp.pxf.io/WqWaze π» Learn Programming - https://datacamp.pxf.io/EKrXPD
I've been watching old videos, so good to finally see you on VS Code! haha
I was given a csv file with 524 columns of date times, instrument telemetry, etc...dataclass saved the day...just cut and paste the column header names and let the decorator do the rest. Also put the in-spec limits in the field's metadata along with LaTex strings for y-axis labels. 524...times. data class ftw.
Oh, basically a decorator function that wrap a class. Nice
I am still not conviced. Sure, for small classes with a few fields and logic it might be worth it. But in real world prod code you will have inheritance, polymorphism, logic, dependecies, etc. and you will end up having to implement all those "hacks" you mentioned. Simple classes will be much easier to understand and read and will have probably less overhead. Dont get me wrong, it is a nice tool to have in mind but call it AMAZING is a little too much IMHO. It would be much better if Dataclass just worked without having to implement all those hacks like post_init. I think it is designed to be use as placeholders for data you get from a database for example.
Man this will be a good and convenient way of reduced my classes code in my current project. Thanks for such good content, and also at the perfect time π
I've only just started watching this video but I just want to say you're really talented and informative. I think you're excellent at conveying what's going on in a simplified way. I think this is the earliest I've ever been for one of your videos haha. Please keep doing what you're doing for the computer science and data science space! Sending you blessings from the UKβΊ
the allmight python can do everything, but if you want to make a legacy instance variable list you need special class factory and if you want static class variables you need specia class variables library :)
As a beginner in python I like your level of detail - a lot of youtubers make assumptions about the details of python.
Perfect timing for this video. I was able to use it right away in my project.
Unlock the Data Inside
Turn Videos into Knowledge
- Get FREE 10/day: transcripts, summaries, chats
- Chat with videos, export text & PDF
- $1 free API credit for RAG, chatbots & research
Free forever plan β’ All features unlocked
Top Comments (10)
To learn programming and Python - check out Datacamp! π» Learn Python - https://datacamp.pxf.io/WqWaze π» Learn Programming - https://datacamp.pxf.io/EKrXPD
I've been watching old videos, so good to finally see you on VS Code! haha
I was given a csv file with 524 columns of date times, instrument telemetry, etc...dataclass saved the day...just cut and paste the column header names and let the decorator do the rest. Also put the in-spec limits in the field's metadata along with LaTex strings for y-axis labels. 524...times. data class ftw.
Oh, basically a decorator function that wrap a class. Nice
I am still not conviced. Sure, for small classes with a few fields and logic it might be worth it. But in real world prod code you will have inheritance, polymorphism, logic, dependecies, etc. and you will end up having to implement all those "hacks" you mentioned. Simple classes will be much easier to understand and read and will have probably less overhead. Dont get me wrong, it is a nice tool to have in mind but call it AMAZING is a little too much IMHO. It would be much better if Dataclass just worked without having to implement all those hacks like post_init. I think it is designed to be use as placeholders for data you get from a database for example.
Man this will be a good and convenient way of reduced my classes code in my current project. Thanks for such good content, and also at the perfect time π
I've only just started watching this video but I just want to say you're really talented and informative. I think you're excellent at conveying what's going on in a simplified way. I think this is the earliest I've ever been for one of your videos haha. Please keep doing what you're doing for the computer science and data science space! Sending you blessings from the UKβΊ
the allmight python can do everything, but if you want to make a legacy instance variable list you need special class factory and if you want static class variables you need specia class variables library :)
As a beginner in python I like your level of detail - a lot of youtubers make assumptions about the details of python.
Perfect timing for this video. I was able to use it right away in my project.