On Sat, 06 Nov 2010 13:54:09 -0700, Chris Rebert wrote: > On Sat, Nov 6, 2010 at 1:01 PM, Mark Wooding <m...@distorted.org.uk> > wrote: >> Chris Rebert <c...@rebertia.com> writes: >> >>> if err.message != "No module named extension_magic_module": >> >> Ugh! Surely this can break if you use Python with different locale >> settings! > > Since when does Python have translated error messages?
Since Python 3.2.4. Or will it be 3.3.5? I will forget. *wink* The point is that Python makes no promises about the error messages. The OP might be using a localised version, or some implementation that's not CPython, or the next version of Python might change the error message. Hell, a user should be able to hack their personal copy of Python and customize the error strings without having to fear that code will break. -- Steven -- http://mail.python.org/mailman/listinfo/python-list