7 Approaches to Validate Class Attributes in Python
Spot the error before it’s too late
Published in
6 min readNov 30, 2020
Generally speaking, type checking and value checking are handled by Python in a flexible and implicit way. Python has introduced typing
module since Python3 which provides runtime support for type hints. But for value checking, there is no unified way to validate values due to its many possibilities.