Skip to content

Commit

Permalink
Fixed errors in the events section of the user guide
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Mar 7, 2018
1 parent dfdae50 commit a86365f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/userguide/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ events dispatched from a signal::

async def listen_to_events(source):
async with aclosing(source.somesignal.stream_events()) as stream:
async for event in events:
async for event in stream:
print(event)

Using :func:`~asphalt.core.event.stream_events`, you can stream events from multiple signals::
Expand All @@ -109,7 +109,7 @@ Using :func:`~asphalt.core.event.stream_events`, you can stream events from mult
async def listen_to_events(source1, source2, source3):
stream = stream_events(source1.some_signal, source2.another_signal, source3.some_signal)
async with aclosing(stream):
async for event in stream):
async for event in stream:
print(event)

The filtering capability of :func:`~asphalt.core.event.wait_event` works here too::
Expand All @@ -118,5 +118,5 @@ The filtering capability of :func:`~asphalt.core.event.wait_event` works here to
stream = stream_events(source1.some_signal, source2.another_signal, source3.some_signal,
lambda event: event.randomproperty == 'foo')
async with aclosing(stream):
async for event in stream):
async for event in stream:
print(event)

0 comments on commit a86365f

Please sign in to comment.