[Python-Dev] unicode Exception messages in py2.7
steve at pearwood.info
Fri Nov 15 04:08:55 CET 2013
On Thu, Nov 14, 2013 at 04:02:17PM -0800, Chris Barker wrote:
> On Thu, Nov 14, 2013 at 1:55 PM, Tres Seaver <tseaver at palladion.com> wrote:
> > Fixing any bug is "changing behavior"; 2.7 is not frozen for bugfixes.
> Thank you.
> > The real question is whether third-party code will break when the
> > now-empty error messages appear with '?' littered through them?
> right -- any bugfix changes behaviour
It isn't clear that this is a bug at all.
Non-ascii Unicode strings are just a special case of the more general
problem of what to do if printing the exception raises. If
str(exception.message) raises, suppressing the message seems like a
perfectly reasonable approach to me.
More information about the Python-Dev