How many times do you want to return multiple values or a complex data structure from a python function and you end up using a dictionary or list? For example: .... Logic Here ... // OR .... Logic Here ... } def get_center_of_rectangle ( topx, topy, bottomx, bottomy ): return pointx, pointy def get_center_of_rectangle ( topx, topy, bottomx, bottomy ): return { "x" : pointx, "y" : pointy It works but imagine that you are calling this function in other functions. There are the following downsides of this approach: 1. You need to revise the function signature ( ). 2. Support of (https://docs.python.org/3/library/typing.html) module is limited. We often need this support for autocomplete, static tests, and improved documentation. https://developer.mozilla.org/en-US/docs/Glossary/Signature/Function typings In "C" Language, you have With the help of we can define the return data type. You can do the same using classes in . But you'll need to write a hell lot of code to define a single struct. And it's like using a tank (Class) to dig a small hole (Just defining the data structure). structs. structs, python Example: (C structs vs Python Classes) }; struct Person { char name[ 50 ]; int citNo; float salary; p = Person() class Person : name: str citNo: int salary: float # In Code: p.name = "Charanjit" p.citNo = 1 p.salary = 0.0001 return p That's why you are not going to prefer writing 5 lines of code (plus the definition of class) just to return a value so most of the time you end up returning } return { "name" : "Charanjit" "citNo" : 1 "salary" : 0.00001 # or return "Charanjit" , 1 , 0.0001 Python Data Classes are here to rescue : : : To replace in my code Documentation https://docs.python.org/3/library/dataclasses.html Where did I find this https://stackoverflow.com/questions/35988/c-like-structures-in-python Where I am going to use this return order, order_action, suggestion Usage: from dataclasses import dataclass @dataclass class Point : x: float y: float z: float = 0.0 p = Point( 1.5 , 2.5 ) Or from dataclasses import dataclass @dataclass class Point : x: float y: float z: float = 0.0 p = Point(x= 1.5 , y= 2.5 , z= 56.5 ) return p # or return Point(x= 1.5 , y= 2.5 , z= 56.5 ) Now your functions are going to return a specific dataclass' object, not the generic dict, or list. python Documentation++ Autocomplete++ ErrorProneCode-- Benefits: