Python public recipes
A @dataclass annotation tells the compiler to create a class that acts as a data type. In this case, the @dataclass annotation tells the compiler to create a class that represents an integer value.
The val field in this class is an int value that represents the integer value of the class.
Shortcut: class.data
@dataclass
class ClassName:
val: int
val2: float = 0.0 # assigning default value