[Tutor] casting string to integer in a list of lists
marc.tompkins at gmail.com
Fri Jan 9 02:29:11 CET 2009
On Thu, Jan 8, 2009 at 3:45 PM, wesley chun <wescpy at gmail.com> wrote:
> A tuple of exceptions works, just like what we did above, and more,
> i.e., (IndexError, ValueError, TypeError, KeyError...
> Thank you, thank you, thank you! I'm sure it's been staring me in the
face, but I never realized I could use a tuple of exception types - that's
why I said it was a pain in the butt, trapping the exception and doing
"isinstance" checks against it. How did I miss this?
Learn something new every day, no?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor