Using Data Classes in Python - Real Python
Using Data Classes in Python
Darren Jones 18 Lessons 1h 31m intermediate pythonOne new and exciting feature that came out in Python 3.7 was the data class. A data class is a class typically containing mainly data, although there aren't really any restrictions.
With data classes, you don't have to write boilerplate code to get proper initialization, representation, and comparisons for your objects.
In this course, you'll learn how to:
- Define your own data classes
- Add default values to the fields in your data class
- Customize the ordering of data class objects
- Work with immutable data classes
What's Included:
- 18 Lessons
- Video Subtitles and Full Transcripts
- Translated Subtitles in 8 Languages
- 2 Downloadable Resources
- Accompanying Text-Based Tutorial
- Interactive Quiz to Check Your Progress
- 5 Hands-On Coding Exercises
- Q&A With Python Experts: Ask a Question
- Certificate of Completion
Downloadable Resources:
Related Learning Paths:
Start NowUsing Data Classes in Python
18 Lessons 1h 31m
- 1. Using Data Classes in Python (Overview) 00:55
- 2. Comparison to Standard Classes 03:43
- 3. Alternatives to Standard Classes 06:25
- 4. Basic Data Classes 06:26
- 5. Exercise: Define a Product Data Class 08:00
- 6. More Flexible Data Classes 01:34
- 7. Advanced Default Values 06:02
- 8. Exercise: Build a Shopping Cart With Default Factory 08:30
- 9. Data Classes for Representation 03:17
- 10. Exercise: Format a Movie With a String Representation 08:00
- 11. Data Classes for Comparison 06:14
- 12. Exercise: Sort Prioritized Tasks 08:00
- 13. Immutable Data Classes 03:02
- 14. Exercise: Create an Immutable Color 08:00
- 15. Inheritance and Subclassing 03:18
- 16. Optimization of Data Classes 03:17
- 17. Using Data Classes in Python (Quiz) 06:00
- 18. Using Data Classes in Python (Summary) 00:47
About Darren Jones
With 20 years as a teacher of music technology, Darren is keen to bring his skills to the Python table.
» More about DarrenEach tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:
Christopher
Sadie
Tappan
Geir Arne
Dan
Joanna
Aldren
Martin
Related Courses:
Using Python Class Constructors