Changed "coroutine" to "coroutine function" in AsyncEventEmitter's docstring
This commit is contained in:
parent
e32f0c0cb1
commit
9b13fab6d8
|
@ -31,7 +31,7 @@ class AsyncEventEmitter:
|
||||||
|
|
||||||
:param on_error: Tells the emitter what to do when an exception occurs inside an event
|
:param on_error: Tells the emitter what to do when an exception occurs inside an event
|
||||||
handler. This value can either be an entry from the asyncevents.ExceptionHandling
|
handler. This value can either be an entry from the asyncevents.ExceptionHandling
|
||||||
enum or a coroutine object. If the passed object is a coroutine, it is awaited
|
enum or a coroutine function. If the passed object is a coroutine function, it is awaited
|
||||||
whenever an exception is caught with the AsyncEventEmitter instance, the exception
|
whenever an exception is caught with the AsyncEventEmitter instance, the exception
|
||||||
object and the event name as arguments (errors from the exception handler itself are
|
object and the event name as arguments (errors from the exception handler itself are
|
||||||
not caught). Defaults to ExceptionHandling.PROPAGATE, which lets exceptions fall trough
|
not caught). Defaults to ExceptionHandling.PROPAGATE, which lets exceptions fall trough
|
||||||
|
@ -42,8 +42,8 @@ class AsyncEventEmitter:
|
||||||
:param on_unknown_event: Tells the emitter what to do when an unknown event is triggered. An
|
:param on_unknown_event: Tells the emitter what to do when an unknown event is triggered. An
|
||||||
unknown event is an event for which no handler is registered (either because it has never
|
unknown event is an event for which no handler is registered (either because it has never
|
||||||
been registered or because all of its handlers have been removed). This value can either be
|
been registered or because all of its handlers have been removed). This value can either be
|
||||||
an entry from the asyncevents.UnknownEventHandling enum or a coroutine object. If the argument
|
an entry from the asyncevents.UnknownEventHandling enum or a coroutine function. If the argument
|
||||||
is a coroutine, it is awaited with the AsyncEventEmitter instance and the event name as arguments.
|
is a coroutine function, it is awaited with the AsyncEventEmitter instance and the event name as arguments.
|
||||||
Defaults to UnknownEventHandling.IGNORE, which does nothing (other enum values are LOG, which
|
Defaults to UnknownEventHandling.IGNORE, which does nothing (other enum values are LOG, which
|
||||||
prints a log message on the logging.WARNING level, and ERROR which raises an UnknownEvent exception)
|
prints a log message on the logging.WARNING level, and ERROR which raises an UnknownEvent exception)
|
||||||
Note: if the given callable is a coroutine, it is awaited, while it's called normally otherwise
|
Note: if the given callable is a coroutine, it is awaited, while it's called normally otherwise
|
||||||
|
|
Loading…
Reference in New Issue