lets say we have a python module with a top level await statement.
this is valid in javascript and ipython, but not python due to the ambiguity of the top level await.
we'll start digging into what it takes to have async imports in python
lets say we have a python module with a top level await statement.
this is valid in javascript and ipython, but not python due to the ambiguity of the top level await.
we'll start digging into what it takes to have async imports in python
https://gist.github.com/Rich-Harris/0b6f317657f5167663b493c722647221
5
lets say we have a python module with a top level await statement.
this is valid in javascript and ipython, but not python due to the ambiguity of the top level await.
we'll start digging into what it takes to have async imports in python
we're about to do some nasty nested `async` business when we are working interactively.
below we ask `IPython` to prefer to the `trio` thread when we execute code cells
this way we can own the `asyncio` event loop.
3
we're about to do some nasty nested
async
business when we are working interactively.
below we ask
IPython
to prefer to the
trio
thread when we execute code cells
this way we can own the
asyncio
event loop.
luckily there is a flag for top level awaits thanks to matthias and his hard work on `IPython`.
https://docs.python.org/3/library/ast.html#ast.PyCF_ALLOW_TOP_LEVEL_AWAIT
3
luckily there is a flag for top level awaits thanks to matthias and his hard work on
IPython
.
we haven't done anything fancy with asyncing the reading the and decoding of the source.
we'll get there though. this is just opening the can of worms. the jokes should follow.
2
we haven't done anything fancy with asyncing the reading the and decoding of the source.
we'll get there though. this is just opening the can of worms. the jokes should follow.