← 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

Description changed to:
If I run the following code, both functions seem to remove the first
element from the tuple. I don't unserstand why this is the case. Any
help would be appreciated

sTestId = "100"

tRounds =("Morning","0700",
                 "Lunch","1200",
                 "Dinner","1600"
                  )

def func1(sTestId,*tRounds):
    print(tRounds)

def func2(sTestId,*tRounds):
    print(tRounds)

print(tRounds)
func2(*tRounds)
func1(*tRounds)

=======
OUTPUT
=======

('0700', 'Lunch', '1200', 'Dinner', '1600')
('Lunch', '1200', 'Dinner', '1600')
('Lunch', '1200', 'Dinner', '1600')

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