Skip to content

Commit

Permalink
Document async context manager
Browse files Browse the repository at this point in the history
  • Loading branch information
nocarryr committed Apr 21, 2017
1 parent 85f5c21 commit 971f5b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pydispatch/dispatch.py
Expand Up @@ -184,12 +184,16 @@ def on_my_event(value):
name (str): The name of the :class:`Event` or :class:`Property`
Returns:
A context manager to be used by the ``with`` statement
A context manager to be used by the ``with`` statement.
If available, this will also be an async context manager to be used
with the ``async with`` statement (see `PEP 492`_).
Note:
The context manager is re-entrant, meaning that multiple calls to
this method within nested context scopes are possible.
.. _PEP 492: https://www.python.org/dev/peps/pep-0492/#asynchronous-context-managers-and-async-with
"""
e = self.__property_events.get(name)
if e is None:
Expand Down

0 comments on commit 971f5b8

Please sign in to comment.