<cr1901_modern>
sb0: run_simulation() takes the module and a generator, correct?
<cr1901_modern>
or a "function that yields" (I forget the difference)?
bentley` has quit [Ping timeout: 250 seconds]
<sb0>
yes
<cr1901_modern>
sb0: Why does the generator function need to be called when passing into run_simulation? I forgot the answer to this
<cr1901_modern>
as opposed to just passing the function in for run_simulation to call later*
<sb0>
run_simulation(module, generator())
<cr1901_modern>
sb0: Less verbose, my question is: why isn't it run_simulation(module, generator)?
<sb0>
because you'd lose the ability to easily pass parameters to the generator
<cr1901_modern>
I see... I suppose it just stops at the first yield and run_simulation just picks up the generator state as-is at that particular point?
<sb0>
calling a generator function in python executes none of the generator code
<sb0>
it only starts executing at the first next()