Execution order of python par changes vs calls/commands

Attached is a test that contains a script that changes and pulses a couple parameters before printing to the text port and calling a method from a component extension. After running the script you can see in the text port that the print statement and promoted component method are executed before the parameter value change and parameter pulse. Furthermore, the parameter pulse callback is executed before the parameter value change callback even though it comes after the parameter change call in the script.

This might be a bit difficult to visualize but if you take a look at the scene and run the “runMe” DAT while looking at the textport it will be pretty clear.

Here’s the script:

# prints "first"
op('container1').par.Valuepar = absTime.frame

# prints "second"
op('container1').par.Pulsepar.pulse()

# prints "third"
print('third')

# prints "fourth"
op('container1').Test()

…and here’s what the textport returns:

third
fourth
second
first

I’m not sure if this is the expected behavior of if I have found a bug but I thought I would post here to get some clarification. At the very least it’s something to be aware of.
parameter_execution_order.4.toe (4.08 KB)

My understanding is this:

The Python is executed immediately, so that stuff goes first.
The parExec happens on the following frame, where values are compared against previous values. Within that, I believe the parameters do their callbacks in their display order.