More Flexible Data Classes
More flexible data classes. So far, you’ve seen some of the basic features of the data class: it gives you some convenience methods, and you can still add default values and other methods. In this section, you’ll learn about some more advanced features, such as parameters to the
@dataclass decorator and the
00:21 Together, they give you more control when creating a data class. Let’s return to the playing card example you saw at the beginning of the video course and add a class containing a deck of cards while we’re at it.
Become a Member to join the conversation.