MCPcopy Create free account
hub / github.com/Jack-Lee-Hiter/AlgorithmsByPython / Singleton.py

File Singleton.py

Target Offer/Singleton.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1'''
2单例模式,核心结构中只包含一个被称为单例类的特殊类,类的对象只能存在一个
3三个要点: 某个类只有一个实例; 必须自行创建这个实例; 必须自行向整个系统提供这个实例
4'''

Callers

nothing calls this directly

Calls 4

MyclassClass · 0.85
MyClass2Class · 0.85
MyClass3Class · 0.85
fooMethod · 0.80

Tested by

no test coverage detected