[Python-Dev] New codecs checked in

"Martin v. Löwis" martin at v.loewis.de
Mon Oct 24 22:49:05 CEST 2005


Walter Dörwald wrote:
> Why should koi_u.py be defined in terms of koi8_r.py anyway? Why not put 
> a complete decoding_table into koi8_u.py?

Not sure. Unfortunately, the tables being used as source are not part of
the Python source, so nobody except MAL can faithfully regenerate them.
If they were part of the Python source, explicitly adding one for
KOI8-U would certainly be feasible.

> I.e. change:
> 
> decoding_map.update({
>     0x0080: 0x0402, #  CYRILLIC CAPITAL LETTER DJE

Hmm. I was suggesting to remove decoding_map completely, in which
case neither the current form nor your suggested cosmetic change
would survive.

> to
> 
> decoding_table = (
>     u'\x00' # 0x00 -> U+0000 NULL

Using U+XXXX in comments to denote the codepoints is a good idea,
anyway.

Regards,
Martin


More information about the Python-Dev mailing list