testing for class of instance
Stephen Hansen
news at myNOSPAM.org
Sun May 13 12:35:29 EDT 2001
You're right, I had a momentary lapse of memory when I was typing the
response in :)
--S
"Greg Ball" <greg.ball at earthling.net> wrote in message
news:3afe92e2.0 at cfanews.harvard.edu...
> Stephen Hansen <news at mynospam.org> wrote:
> except (TypeError,AttributeError):
> ...
>
> As written, you will catch only TypeError, and when
> you do, you'll assign the exception to local variable
> AttributeError.
>
> See http://www.amk.ca/python/writing/warts.html
>
> --Greg Ball
>
More information about the Python-list
mailing list