Good, funny. I thought about this for a while, but only after the publication of the question - especially when choosing tags and adding a "metaclass" - I realized that I could answer myself. So, presented for review and future knowledge, it says here:
class Base_Metaclass(type): def __new__(meta, classname, bases, class_dict): new_type = type.__new__(meta, classname, bases, class_dict) if not (new_type.NOMINATOR % new_type.DENOMINATOR) == 0: raise Exception("Invalid subclass created - validation failed") return new_type
And now all the children should be automatic.
source share