2023年5月16日

元类强制编码规范

摘要: 元类一般作为顶层框架使用 在顶层控制底层派生类方法的命名规范 class Meta(type): def __new__(cls, clsname, bases, clsdict): for name in clsdict: if name.lower() != name: raise TypeEr 阅读全文

posted @ 2023-05-16 11:29 默玖 阅读(4) 评论(0) 推荐(0) 编辑

导航