Descriptors are what power @property, Django model fields and dataclass-style validation. Build reusable validated fields.
Implement:
Field(type_, *, min=None, max=None, choices=None, default=MISSING) that validates on assignment. Raise TypeError for the wrong type (an int is acceptable where float is expected; bool is not acceptable as a number), and ValueError for out-of-range or not-in-choices values. Error messages must include the attribute name, so use __set_name__.default, or raises AttributeError if there's no default.@validated that adds an __init__(**kwargs) assigning each keyword to its field, and raising TypeError for unknown keywords.