Author leosoto
Recipients leosoto
Date 2008-05-25.05:50:16
SpamBayes Score 0.0775008
Marked as misclassified No
Message-id <>
On CPython, KeyError.__str__ is special, because it uses repr() of the
exception argument instead of str(). Here is the reason, from  exceptions.c:

       If args is a tuple of exactly one item, apply repr to args[0].
       This is done so that e.g. the exception raised by {}[''] prints
         KeyError: ''
       rather than the confusing
       alone.  The downside is that if KeyError is raised with an
       string, that string will be displayed in quotes.  Too bad.
       If args is anything else, use the default BaseException__str__().

Currently, Jython doesn't match this behaviour.
Date User Action Args
2008-05-25 05:50:33leosotosetspambayes_score: 0.0775008 -> 0.0775008
recipients: + leosoto
2008-05-25 05:50:31leosotosetspambayes_score: 0.0775008 -> 0.0775008
messageid: <>
2008-05-25 05:50:29leosotolinkissue1040 messages
2008-05-25 05:50:29leosotocreate