[Python-3000] PEP 3131 is implemented
Barry Warsaw
barry at python.org
Wed Aug 15 14:28:56 CEST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Aug 15, 2007, at 4:37 AM, Martin v. Löwis wrote:
> I just implemented PEP 3131 (non-ASCII identifiers).
>
> There are several problems with displaying error messages,
> in particular when the terminal cannot render the string;
> if anybody wants to work on this, please go ahead.
I'm not sure this is related only to PEP 3131 changes (I haven't
tried it yet), but I hit a similar problem when I was working on the
email package. I think I posted a message about it in a separate
thread.
If an exception gets raised with a message containing characters that
can't be printed on your terminal, you get a nasty exception inside
io, which obscures the real exception. The resulting traceback makes
it difficult to debug what's going on. I haven't looked deeper but /
my/ solution was to repr the message before instantiating the
exception. IWBNI Python itself Did Something Better.
- -Barry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
iQCVAwUBRsLxiHEjvBPtnXfVAQLSkAQAuC0UAWwFb5kC6uQb9zhCm4zH/BMKaN1k
hb6PheDHHl2KnwKoVB+Lw3XrBlbrvZotpYnThQEAG4vNtW92O59zf1uxtRwFo16Q
dvQhqwx4fAobWWQYkIK1F7i6SaEyHa+8D8iXy33RTcZKkwKvD69miSFyGxEyHq2x
2zH1Uk+qzos=
=P+66
-----END PGP SIGNATURE-----
More information about the Python-3000
mailing list