Skip to content

Commit

Permalink
Update docs/source/examples/ho_contingency.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian authored Feb 9, 2024
1 parent 73fef34 commit 02d2bf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/examples/ho_contingency.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"**Exception handling in generator coroutines**\n",
"\n",
"Generator coroutines [expose exception throwing](https://tacaswell.github.io/coroutines-i.html) as a user communication channel. This means\n",
"there is some [in-band encoding](https://youtu.be/iKzOBWOHGFE?si=XAtQKhk3eHboHcL-&t=1011) of Python's control exceptions with the users exceptions. When the `close()` [method](https://docs.python.org/3/reference/expressions.html#generator.close) is called on generator corutine Python will throw a [`GeneratorExit`](https://docs.python.org/3/library/exceptions.html#GeneratorExit) exception into the coroutine. If you catch this exception and try to yield another `Msg`, either explictily in an `except` block or in a `finally` block Python will raise a `RuntimeError` at the call site.\n",
"there is some [in-band encoding](https://youtu.be/iKzOBWOHGFE?si=XAtQKhk3eHboHcL-&t=1011) of Python's control exceptions with the users exceptions. When the `close()` [method](https://docs.python.org/3/reference/expressions.html#generator.close) is called on a generator coroutine, Python will throw a [`GeneratorExit`](https://docs.python.org/3/library/exceptions.html#GeneratorExit) exception into the coroutine. If you catch this exception and try to yield another `Msg`, either explicitly in an `except` block or in a `finally` block, Python will raise a `RuntimeError` at the call site.\n",
"\n",
"If you want to directly use `try..except..else..finally` you must handle this case. See the source of these decorators for a guide.\n",
"\n",
Expand Down

0 comments on commit 02d2bf4

Please sign in to comment.