File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments