Created
May 16, 2018 17:25
-
-
Save Fuyukai/4d771da30b3c21a3f4a5ec31502771f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import trio | |
async def one(): | |
try: | |
1 / 0 | |
except ZeroDivisionError: | |
await two() | |
async def two(): | |
await one() | |
return 1 # never happens | |
async def main(): | |
async with trio.open_nursery() as n: | |
n.start_soon(one) | |
trio.run(main) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment