Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Seogeurim/CS-study
/ Borg
Class
Borg
contents/design-pattern/code/SingletonPython/borg_singleton.py:3–8 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
__author__ =
'Chetan'
2
3
class
Borg:
4
__shared_state = {}
5
def
__init__(self):
6
self.x = 1
7
self.__dict__ = self.__shared_state
8
pass
9
10
b = Borg()
11
b1 = Borg()
Callers
1
borg_singleton.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected