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 默玖 阅读(6) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示