A use case cited in [this stackoverflow discussion](https://stackoverflow.com/questions/58211783/how-to-validate-a-class-attribute-in-python) is to define class fields, so that subclasses are restricted when they override them. Maybe `classfield()` could be easily done, similarly to `field()`
Activity
smarie commentedon Oct 18, 2019
It could be done easily (see branch https://github.com/smarie/python-pyfields/tree/class_fields) but python descriptors do not currently support that
__set__is called for class binding. It is not clear from the doc https://docs.python.org/3/reference/datamodel.html#invoking-descriptors