Re:Python Logic Simulation Library
by woadwarrior01 on Friday November 08, 2024 @07:53PM
(#42091706)
> Can you comment on the use of asynchronous code rather than generators?
I'm not the OP. IIUC, async functions are implemented using generators under the hood. cf: The asyncio.coroutine decorator from Python 3.4, before async await syntax was implemented in Python 3.5 (PEP 492).
Re:Python Logic Simulation Library
by cjdrake on Friday November 08, 2024 @11:51PM
(#42092614)
Correct in this case. In src/seqlogic/sim.py there are four usages of 'yield' keyword that suspend the current coroutine and return control to the event loop.
I'm not the OP. IIUC, async functions are implemented using generators under the hood. cf: The asyncio.coroutine decorator from Python 3.4, before async await syntax was implemented in Python 3.5 (PEP 492).