Last active
December 23, 2015 21:19
-
-
Save nickserv/6695542 to your computer and use it in GitHub Desktop.
Python: Borg Pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See http://code.activestate.com/recipes/66531/ | |
class Borg: | |
__shared_state = {} | |
def __init__(self): | |
self.__dict__ = self.__shared_state |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment