Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Your example seems incomplete. Could you provide a working example and explain the desired behaviour?
Anyway, in your function definition, you define order=permutations, i.e. the internal variable 'order' has the standard value 'permutations', i.e. the value of 'permutations' when you define the function. If you change 'permutations' later on, it has no effect, unless you change the line from

if permutations == "dx dy":

to

if order == "dx dy":

If you then modify permutations and call:

permutations = "dx dy"
interplay(order= permutations)

the code in the if block should be executed and if you do something else such as

permutations = "blah"
interplay(order= permutations)

the code in the else block should be executed. Not sure if this answers your question, as I don't understand how the whole thing is supposed to work, so a working example would be nice.