meta data for this page
  •  

dataclass

validators

@dataclass
class Address:
  street: str
  postcode: str
  city: str
  country: str
 
  def __post_init__(self):
    if not ...:
      raise ValueError("...")
    if not isinstance(self.street, str):
      raise TypeError("...")