usim
usim copied to clipboard
API changes/renames: interrupt scopes
The InterruptScope
is currently available as usim.until
:
async with until(time==20):
...
This gives the appearance that it works like a loop (while
vs. until
) and does not reflect the interrupt aspect much.
Possible alternatives:
- Speaking
with out
orwith draw
:
async with out(time==20):
...
async with draw(time==20):
...
Visually, a leading _
could reflect the connection to the with
:
async with _out(time==20):
...
However, leading _
has reserved meaning in Python.