MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __post_init__

Method __post_init__

geometry/geometry.py:32–34  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 degrees: float = 90
31
32 def __post_init__(self) -> None:
33 if not isinstance(self.degrees, (int, float)) or not 0 <= self.degrees <= 360:
34 raise TypeError("degrees must be a numeric value between 0 and 360.")
35
36
37@dataclass

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected