[Python-Dev] TypeError and AttributeError
James_Althoff@i2.com
James_Althoff@i2.com
Wed, 11 Jul 2001 15:02:23 -0700
Given that
except (TypeError, AttributeError):
is the "safest across releases" idiom (as suggested by Tim Peters),
would it make sense to make AttributeError a subclass of TypeError so that
except (TypeError):
would become equally "safe" (and simpler)?
Potentially, some exception handling code would behave differently
(break?), but apparently this is already the case given that what is raised
(AttributeError or TypeError) changes between releases.
Jim