problems with looping, i suppose

John Salerno johnjsal at NOSPAMgmail.com
Mon Mar 27 14:56:46 EST 2006


Gary wrote:

> 0 Alignment problem with the "except" clause.
>     As I'm sure you've already discovered, Python is "whitespace
> sensitive".

Wow, I'm really confused. As it turns out, whitespace *was* the problem, 
but it looks no different now (as it works) than it did then (when it 
didn't work). I don't know if my copy/paste worked properly for you 
guys, but as I see it in my newsreader, everything looks right. 
try/excepts are indented inside whiles, if/else are indented within 
tries, and if lines are indented under the ifs.

I just don't see where the problem was. Maybe it was a result of my text 
editor doing whatever it does to auto-indent, because originally I 
didn't have the while loop, so after adding it I had to indent the other 
stuff. But it never *looked* wrong, so I don't get it...

Does what I originally pasted in my message look incorrect? To me, it 
all seems indented properly.



More information about the Python-list mailing list