problems with looping, i suppose

John Salerno johnjsal at
Tue Mar 28 21:01:15 CEST 2006

Sion Arrowsmith wrote:
> John Salerno  <johnjsal at> wrote:
>> Does what I originally pasted in my message look incorrect? To me, it 
>> all seems indented properly.
> Yes. Somewhere or other you've got your tabstop set to 4, and python
> treats literal tabs as being of equivalent indent to 8 spaces. As
> does my newsreader, so the problem was obvious:
> while True:
>         tries += 1
> ^ This was a tab (my cut&paste has turned it back into spaces)
>         try:
> ^ This was a tab too.
>         if guess == number:
> ^^^^^^^^ This was eight spaces even before I cut&pasted.

Ah, that makes sense now! Thanks!

More information about the Python-list mailing list