[Python-Dev] Internationalization Toolkit
Barry A. Warsaw
bwarsaw@cnri.reston.va.us (Barry A. Warsaw)
Thu, 11 Nov 1999 11:04:29 -0500 (EST)
>>>>> "M" == M <mal@lemburg.com> writes:
M> Doesn't Python convert class exceptions to strings when -X is
M> used ? I would guess that many scripts already rely on the
M> class based mechanism (much of my stuff does for sure), so by
M> the time 1.6 is out, I think -X should be considered an option
M> to run pre 1.5 code rather than using it for performance
M> reasons.
This is a little off-topic so I'll be brief. When using -X Python
never even creates the class exceptions, so it isn't really a
conversion. It just uses string exceptions and tries to craft tuples
for what would be the superclasses in the class-based exception
hierarchy. Yes, class-based exceptions are a bit of a performance hit
when you are catching exceptions in Python (because they need to be
instantiated), but they're just so darn *useful*. I wouldn't mind
seeing the -X option go away for 1.6.
-Barry