$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · hard · #211

What goes in the blank?

# generate a data class with __init__ for free
from dataclasses import dataclass
@____
class P:
    x: int

Answer: dataclass (also accepted: dataclass, dataclass())

@dataclass writes __init__, __repr__ and __eq__ for you.
Play Problem Solving ▸