# Wait expression, how does it work...?

Hello,

i have still some trouble to run. Does anyone have real example? why have I a “set” Error?

``````wait = IN[0]
passby = IN[1]

out = {wait,passby};

OUT = out[1]
``````
1 Like

does this work?

out = [wait,passby];
OUT = [out][1]

“1” is out of range… “[0]” does work

``````wait = IN[0]
passby = IN[1]

out = [wait,passby];

OUT = [out][0]
``````

so remove the [ ] of out because it is taking both lists as a single combined list and you want the second I understand

``````wait = IN[0]
passby = IN[1]

out = [wait,passby];

OUT = out[1]
``````

but is this not just a simple index? should it not be make addition and than multiplication ?
insteat it takes the second (passby)…

Do you have a better example?

“like wait for addition and pass multiplication” ?

I understand passby is already a list of whatever so it is picking just passby and not the other, it should work with any list, it does the same than the codeblock is my understanding.

Your sample is doing well now

you can do it like that as well:

``````OUT = [IN[0],IN[1]][1];
``````

should be that not the function of wait,pass ? so actually for what i am waiting for ? i can just make get item at index

What exactly are you trying to do? Why do you need a wait function? If you’re using python you don’t actually need to introduce any sort of “waiting”. The purpose of a wait node is to allow one portion of a graph to finish before starting the next portion of a graph. With python, you choose the order that functions get executed, so you already have full control.

EDIT: In your example you seem to be wanting to wait for the addition function and then pass the multiplication function, but the functions have already run. There’s nothing to wait on. You typically only need a wait node when a transaction is occurring that would cause the same object to have different values at different points in the graph. You have to force one function to complete first before you even start the next one. The `wait` input represents the final output of the first function (so you know it’s finished) and the `pass` input represents the first input for the next function (to force it to start). Dynamo has to have all inputs to a node before it executes, so the idea here is that by combining the final output and the initial input into one code block, you’re forcing both of those things to be rectified before continuing.

1 Like

perhaps my brain does not understand your issue, I think I responded to the main question of the title

thank you… actually this passthrougth is just indexing values from a list. i just wanted to understand the expression, to understand how and when i can use it. its like a if-sentence, it needs partucalry way to think, or a dessions based on vectors.

even in python tutorial i can find the “passthrough” issue, i will keep on this topic

creating a list with 2 inputs but taking only one of both, so until you do not feed with both, the script does not continue haha