Skip to content

Commit

Permalink
fixed multiple subscribers example
Browse files Browse the repository at this point in the history
  • Loading branch information
jmwohl committed May 13, 2015
1 parent 8bc4d85 commit 4e0c244
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def handleLoginEvent(username=None):

# another callback elsewhere in the application
def anotherLoginEventHandler(username=None):
print(username + ' logged in.')
print(username + ' is a real winner.')

# subscribe the callbacks to the login event
pubsub.subscribe('login', handleLoginEvent)
Expand All @@ -86,7 +86,7 @@ pubsub.subscribe('login', anotherLoginEventHandler)
# when the login event is published, both callback will be called with the supplied **kwargs
pubsub.publish('login', username='richard')

# prints 'richard logged in.'
# prints 'richard logged in.' and 'richard is a real winner.'

```

Expand Down

0 comments on commit 4e0c244

Please sign in to comment.