设计模式 Posted Apr 24, 2025 By lreverse 1 min read 设计模式 Contents 设计模式 单例模式基于 Python 对象创建机制的特性实现的当执行 obj = MyClass() 时,Python 底层会先调用 new 创建对象,再调用 init 初始化对象。因此,new 是实例化过程的入口 Coding, python python This post is licensed under CC BY 4.0 by the author. Share