[sf-lug] ThinkPython: coding problem

Alex Kleider a_kleider at yahoo.com
Sun Oct 12 17:34:16 PDT 2008



--- On Sun, 10/12/08, Tom Haddon <tom at greenleaftech.net> wrote:

> try:
>   value = int(n)
> except ValueError:
>   return False
> 
> The reason you don't want an unqualified
> "except" is that you may not be
> catching the error you thing you're catching without
> it.
> 
> Cheers, Tom
> 
The code has been changed: ValueError has been added as you recommended.
Thanks for your help.
Hopefully Professor Laroia will be proud:-)

cheers, alex




      




More information about the sf-lug mailing list