Title | : | This Is Why Python Data Classes Are Awesome |
Duration | : | 22:19 |
Viewed | : | 794,406 |
Published | : | 25-03-2022 |
Source | : | Youtube |
Data classes in Python are really powerful and not just for representing structured data. In this video, I show you what you can do with dataclasses as well as new capabilities that have been added in Python 3.10. 💡 Get the FREE 7-step guide to help you consistently design great software: https://arjancodes.com/designguide. 🎓 Courses: The Software Designer Mindset: https://www.arjancodes.com/mindset The Software Architect Mindset: Pre-register now! https://www.arjancodes.com/architect Next Level Python: Become a Python Expert: https://www.arjancodes.com/next-level-python The 30-Day Design Challenge: https://www.arjancodes.com/30ddc 🛒 GEAR & RECOMMENDED BOOKS: https://kit.co/arjancodes. 👍 If you enjoyed this content, give this video a like. If you want to watch more of my upcoming videos, consider subscribing to my channel! 💬 Discord: https://discord.arjan.codes 🐦Twitter: https://twitter.com/arjancodes 🌍LinkedIn: https://www.linkedin.com/company/arjancodes 🕵Facebook: https://www.facebook.com/arjancodes 👀 Code reviewers: - Yoriz - Ryan Laursen - Sybren A. Stüvel - Dale Hagglund 🎥 Video edited by Mark Bacskai: https://www.instagram.com/bacskaimark 🔖 Chapters: 0:00 Intro 0:49 What are data classes? 1:37 Explaining the example 4:00 Dataclasses basics 5:45 Assigning default values 8:54 Excluding arguments from the initializer 9:44 Using post_init to generate extra fields 11:25 Private/protected members 11:59 Excluding information from the repr 12:43 Freezing a dataclass 14:59 (new in Python 3.10) kw_only 16:10 (new in Python 3.10) match_args 17:00 (new in Python 3.10) slots 21:30 Final thoughts #arjancodes #softwaredesign #python DISCLAIMER - The links in this description might be affiliate links. If you purchase a product or service through one of those links, I may receive a small commission. There is no additional charge to you. Thanks for supporting my channel so I can continue to provide you with free content each week!
A Simple & Effective Way To Improve Python Clas... 12:40 - 99,402 |
5 Good Python Habits 17:35 - 405,828 |
Understanding B-Trees: The Data Structure Behin... 12:39 - 292,089 |
The Ultimate Guide to Writing Functions 24:31 - 178,329 |
Pydantic Tutorial • Solving Python's Biggest ... 11:07 - 246,758 |
Python dataclasses will save you HOURS, also fe... 08:50 - 875,089 |
FINALLY, I Understand the Difference Between th... 15:38 - 18,616 |
Software engineer interns on their first day be... 02:21 - 13,833,678 |