Skip to content

Commit

Permalink
Clean Borg / MacroResolver classes - only comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mohierf committed May 15, 2017
1 parent 455305b commit be10b0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion alignak/borg.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ class Borg(object): # pylint: disable=R0903
"""Borg class define a simple __shared_state class attribute.
__dict__ points to this value when calling __init__
TODO: Is this class really needed? Only subclassed by MacroSolver
This is used to make a Singleton-like pattern with a python object that inherits from the Borg.
The Singleton design pattern (DP) has a catchy name, but the wrong focus -- on identity
rather than on state. The Borg design pattern has all instances share state instead,
and Python makes it, literally, a snap.
"""
__shared_state = {}

Expand Down
1 change: 0 additions & 1 deletion alignak/macroresolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@

import re
import time
# import warnings

from alignak.borg import Borg

Expand Down

0 comments on commit be10b0c

Please sign in to comment.