0

I can't figured out why is this working :

T1 = tree.insert("", 'end', text=BO[2],tags = (BO[3]),values=(strftime(" %d-%m-%Y", gmtime()),BO[5],BO[6],BO[7],BO[8]))

while this one is not working :

T1 = tree.insert("", 'end', text=BO[2],tags = (BO[3]),values=(BO[4]),BO[5],BO[6],BO[7],BO[8]))

I get the following error :

non-keyword arg after keyword arg

ᴀʀᴍᴀɴ
  • 4,443
  • 8
  • 37
  • 57
Raskaya
  • 37
  • 8

1 Answers1

3

you have an extra parenthesis after BO[4], so it thinks B[5] through BO[8] are arguments to insert(), not part of the values tuple

T1 = tree.insert("", 'end', text=BO[2],tags = (BO[3]),values=(BO[4],BO[5],BO[6],BO[7],BO[8]))

rbp
  • 1,850
  • 15
  • 28
  • also, please note that when you are using tuple syntax, you should always leave a trailing comma http://stackoverflow.com/questions/7992559/python-tuple-trailing-comma-syntax-rule – rbp Jan 15 '16 at 19:27
  • 1
    sometimes an extra set of eyes helps, as does a "correct answer" mark :) – rbp Jan 15 '16 at 19:28