Skip to content

Commit

Permalink
better doc for StatefulPublisher.reset_state
Browse files Browse the repository at this point in the history
  • Loading branch information
semiversus committed Oct 6, 2018
1 parent d39d113 commit 88e7e67
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions broqer/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ def notify(self, value: Any) -> asyncio.Future:
return Publisher.notify(self, value)

def reset_state(self, value=NONE):
""" Resets the state. Behavior for .subscribe() and .get() will be
like a stateless Publisher until next .emit()
""" Resets the state. If value argument is not used, the behavior for
.subscribe() and .get() will be like a stateless Publisher until next
.emit() . Calling this method will not trigger an emit.
:param value: Optional value to set the internal state
"""
self._state = value

0 comments on commit 88e7e67

Please sign in to comment.