Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 497 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 497 Bytes

Design Pattern Singleton

Analysis and implementation of the Singleton Design Pattern

Singleton

Singleton is a creational design pattern that lets you ensure that a class has only one instance, while providing a global access point to this instance.

How to run Python

python main.py

Output :

Singleton works, both variables contain the same instance

Structure :

├── main.py