2022年12月6日

数据模型的类型的约束

摘要: 基于描述符建立数据模型实现赋值验证框架 在实例属性的获取和设定方面,前面已经提过可以使用property和描述符实现 1、创建数据模型的基础构建模块 1 class Descriptor: 2 def __init__(self, name=None, **opts): 3 self.name = 阅读全文

posted @ 2022-12-06 10:55 默玖 阅读(24) 评论(0) 推荐(0) 编辑

导航