← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #256017]: Packing a tuple and passing it to a function removes the first element

 

Question #256017 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/256017

    Status: Open => Answered

Eugene S proposed the following answer:
When you defined your functions, you stated that you were expecting a single argument (as sTestId) and a list of arguments (as *tRounds), then you pass the tuple you mentioned.
What happens is that your first argument "0700" is assigned to "sTestId" and the rest of the variables in tuple are assigned to "*tRounds". This is why you get such output.

If you want the whole list you can:
1. Remove the "sTestId" from function definition
2. Pass additional variable to a function (maybe that's what you had in mind) so it will be assigned to "sTestId" and the rest (the values in tuple) will be assigned to "*tRounds".


Cheers,
Eugene

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.