Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 343 Bytes

File metadata and controls

12 lines (8 loc) · 343 Bytes

Chapter 5: Singleton design pattern

Singleton: ensures a class has only one instance, and provides a global point of access to it.

My implementation is based this stackoverflow post.

Running the code

python chocolate.py