Re: Weird try-except vs if behavior

2010-10-15 Thread Ryan Kelly
On Thu, 2010-10-14 at 22:43 -0700, James Matthews wrote: Hi, I have this code http://gist.github.com/627687 (I don't like pasting code into the mailing list). Yes, but it makes it harder to discuss the ode and makes the archive that much more useless. It's only a couple of lines, here ya

Re: Weird try-except vs if behavior

2010-10-15 Thread Terry Reedy
On 10/15/2010 3:11 AM, Ryan Kelly wrote: On Thu, 2010-10-14 at 22:43 -0700, James Matthews wrote: Hi, I have this code http://gist.github.com/627687 (I don't like pasting code into the mailing list). Yes, but it makes it harder to discuss the ode and makes the archive that much more useless.

Weird try-except vs if behavior

2010-10-14 Thread James Matthews
Hi, I have this code http://gist.github.com/627687 (I don't like pasting code into the mailing list). I am wondering why the try except is taking longer. I assume that if the IF statement checks every iteration of the loop (1000 times) shouldn't it be slower? James --