Skip to content

Commit dd70ec7

Browse files
committed
clarify this is a simplified example
Change-Id: I3a9a4f8562d57091031386785354c32ec316cd88
1 parent e020f39 commit dd70ec7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/build/synopsis.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ other greenlets anywhere within the execution of that greenlet::
177177

178178
Above, the ``send_receive_logic()`` function is called within a greenlet that
179179
itself links to a parent greenlet that's local to the :func:`.async_def`
180-
callable (this is the normal way that greenlet works)::
180+
function (this is the normal way that greenlet works). Below we illustrate
181+
a **simplified** version of :func:`.async_def` that does not include details
182+
like exception handling and other robustness regarding arguments::
181183

182184
async def async_def(
183185
fn: Callable[..., _T],
@@ -273,5 +275,7 @@ True, then we know the function completed; we return the result!
273275
# no more awaits; so this is the result!
274276
return result
275277

276-
277-
Minus error handling and some other robustness details, that's the whole thing!
278+
The real function has a more elements within the loop to accommodate for
279+
exceptions thrown from the callable, as well as other features to check that
280+
awaitables ran if this was expected. But minus those details, the single loop
281+
is pretty much the whole thing!

0 commit comments

Comments
 (0)