小知识点整理--元类


1.通过元类限制类的名字首字母大写
    if not class_name.istitle():
        raise TypeError('类的名字首字母需要大写')

2. 控制类中必须要有注释
        if not class_dict.get('__doc__'):
            raise TypeError('类内部必须要有注释')
3.


原文地址:https://www.cnblogs.com/ludundun/p/11806699.html