[Python-Dev] Re: [Python-checkins] python/dist/src/Lib/email/test test_email_codecs.py, 1.4, 1.5

Hye-Shik Chang perky at i18n.org
Sun Jan 18 10:26:16 EST 2004


On Sun, Jan 18, 2004 at 03:56:51PM +0100, "Martin v. L?wis" wrote:
> Anthony Baxter wrote:
> >If it can be shown that this is a pure win (that is, it improves code
> >for 2.3.4, but is both backwards and forwards compatible, then I don't
> >mind. I _do_ mind if we end up with the horror of 2.2.2's not-really-
> >booleans, which has resulted in FAR FAR too much code of the form:
> >
> >try:
> >    True, False
> >except:
> >    True, False = 1, 0
> 
> It depends on the usage. If applications just do
> 
> foo.encode("some-cjk-encoding")
> 
> then all will work fine. However, it may be that applications
> do
> 
> try:
>   codecs.lookup("some-cjk-encoding")
> except LookupError:
>   try:
>     import japanese
>     japanese.register_aliases()
>   except ImportError:
>     pass

This usage is useful only for -S mode. The recent Asian codecs
register its aliases by their respective .pth. So, backporting
CJK codecs won't let Japanese developers code in this way.
If there's a man who need real JapaneseCodecs not CJK codecs,
they can use it by installing JapaneseCodecs package as they've
been done.


Hye-Shik



More information about the Python-Dev mailing list