[issue1031213] Use correct encoding for printing SyntaxErrors

Guido van Rossum report at bugs.python.org
Thu Oct 11 18:53:28 CEST 2007


Guido van Rossum added the comment:

There are tons of situations where such an exception will be
suppressed, ofr better or for worse. I don't think this one deserves
such a radical approach.

On 10/11/07, atsuo ishimoto <report at bugs.python.org> wrote:
>
> atsuo ishimoto added the comment:
>
> Codecs would hardly ever raises exception here.
> Usually, exception raised here would be a MemoryError. The unicode
> string we are trying to encode is just decoded by same codec. If codec
> raises exception other than MemoryError, the codec will likely have problem.
>
> I attached a script to print exception raised by codec. I wrote a "buggy"
> encoder, which never return string but raises an exception.
>
> _____________________________________
> Tracker <report at bugs.python.org>
> <http://bugs.python.org/issue1031213>
> _____________________________________
>

_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1031213>
_____________________________________


More information about the Python-bugs-list mailing list