[Tutor] Staring myself blind
Bob Gailer
bgailer at alum.rpi.edu
Sat Jan 20 23:41:32 CET 2007
Toon Pieton wrote:
> Hey friendly users!
>
> In a program I'm writing, I'm getting a Tab/space error, with the
> usual 1) identation is incorrect or 2) mixes tabs and spaces. I just
> can't seem to find. I tried selecting everything and untabbing it, no
> workie. I searched an searched and searched, but couldnt find anything
> that is really wrong.
I copied this and pasted it in into my Python editor. I added while 1:
at the top so I could preserve your indentation. What I get is a syntax
error, highlighting the ) after the 5 in the line:
z = [yx[0],xz[0],xz[1],xz[2],xz[3],xz[4],xz[5)],xz[6]]
When I remove the ) it compiles OK.
>
> The error shows up on this line:
> highcard = [z[8],z[7],z[6],z[5],z[4]]
>
> The lines surrounding this one are:
> while zab < winlen:
> yx = winner[int(winkeys[zab])]
> xz = yx[1]
> z =
> [yx[0],xz[0],xz[1],xz[2],xz[3],xz[4],xz[5)],xz[6]]
> # Card 1
> if z[7] > highcard[0]:
> highcard = [z[8],z[7],z[6],z[5],z[4]]
> defwinner = [winkeys[zab]]
> elif z[7] == highcard[0]:
>
> I can't post the whole program, since it's ~1000 lines long.
>
> Does anybody see what causes the problem? Or have any tips how to find
> the error easily?
>
> Thanks in advance!
> Toon Pieton
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
--
Bob Gailer
510-978-4454
More information about the Tutor
mailing list