Related with a previous question and response: /a/78416343/8054608
class VarCharType(str, ABC):
_MIN_LENGTH: int
The improvements required for :
- ✔ Access from outside of class to
_MIN_LENGTH
value. Change to public constant - ❌ Guarantee the implementation of
_MIN_LENGTH
in all child classes.
In the past I combined property
+ classmethod
+ abstractmethod
decorators. But seems that now is deprecated.
Chaining classmethod descriptors (introduced in bpo-19072) is now deprecated. It can no longer be used to wrap other descriptors such as property. The core design of this feature was flawed and caused a number of downstream problems. To “pass-through” a classmethod, consider using the wrapped attribute that was added in Python 3.10. (Contributed by Raymond Hettinger in gh-89519.)
It is not required to use previous response/solution.