Solved by albanD in post #8 
              
              
                Ho sorry I think I misread the title of the topic and though it was an error  
Does the function f has any parameter into it? 
If there is nothing else in there, and the only way to get to the parameters is via x and y, I would do: 
x, y = g(input, params)
# f must have NO parameters
# Equivalent (b…