usim icon indicating copy to clipboard operation
usim copied to clipboard

API changes/renames: interrupt scopes

Open maxfischer2781 opened this issue 5 years ago • 1 comments

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 or with 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.

maxfischer2781 avatar Apr 04 '19 15:04 maxfischer2781