[Python-Dev] Some thoughts on the codecs...
Guido van Rossum
guido@CNRI.Reston.VA.US
Wed, 17 Nov 1999 08:34:23 -0500
> This is the simplest if each codec really is likely to
> be implemented in a separate module. But just look at
> the data! All the iso-8859 encodings need identical
> functionality, and just have a different mapping table
> with 256 elements. It would be trivial to implement
> these in one module. And the wide variety of Japanese
> encodings (mostly corporate or historical variants of
> the same character set) are again best treated from
> one code base with a bunch of mapping tables and
> routines to generate the variants - basically one can
> store the deltas.
>
> So the choice is between possibly having a lot of
> almost-dummy modules, or having Python modules which
> generate and register a logical family of encodings.
>
> I may have some time next week and will try to code up
> a few so we can pound on something.
I see no problem with having a lot of near-dummy modules if it
simplifies the architecture. You can still do code sharing. Files
are cheap; APIs are expensive.
--Guido van Rossum (home page: http://www.python.org/~guido/)