Using Data Classes in Python

Darren Jones
Darren Jones 13 Lessons 45m intermediate python

One 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:

  • 13 Lessons
  • Video Subtitles and Full Transcripts
  • 2 Downloadable Resources
  • Accompanying Text-Based Tutorial
  • Interactive Quiz to Check Your Progress
  • Q&A With Python Experts: Ask a Question
  • Certificate of Completion

Downloadable Resources:

Related Learning Paths:

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 Darren

Each 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:

โ† Browse All Courses