Skip to content

Analysis and implementation of the Singleton Design Pattern

Notifications You must be signed in to change notification settings

AminEhsan/DesignPattern-Singleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

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