Skip to content

Commit 2bcbe2c

Browse files
committed
Changed interface of clicker slightly.
1 parent b5c95a2 commit 2bcbe2c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

diffpy/srfit/equation/clicker.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,18 @@ def click(self):
103103
Observers will be given the same state as this clicker.
104104
"""
105105
self.__class__._numclicks += 1
106-
self._click()
106+
self.update()
107107
return
108108

109-
def _click(self):
110-
"""Increment the local state without changing the global state.
109+
def update(self):
110+
"""Update the state of this clicker to its observers.
111111
112-
This is used internally. Do not call this method.
112+
This sets the local state to the global state and transmits this to
113+
the observers.
113114
"""
114115
self._state = self.__class__._numclicks
115116
for clicker in self._observers:
116-
clicker._click()
117+
clicker.update()
117118

118119
def __cmp__(self, other):
119120
"""Compare the counter of two Clickers.

0 commit comments

Comments
 (0)