[Python-Dev] Unicode patches checked in

M.-A. Lemburg mal@lemburg.com
Wed, 15 Mar 2000 15:57:13 +0100


Vladimir Marangozov wrote:
> 
> M.-A. Lemburg wrote:
> >
> > Note that unicodedata is only needed by programs which do
> > a lot of Unicode manipulations and in the future probably
> > by some codecs too.
> 
> Perhaps it would make sense to move the Unicode database on the
> Python side (write it in Python)? Or init the database dynamically
> in the unicodedata module on import? It's quite big, so if it's
> possible to avoid the static declaration (and if the unicodata module
> is enabled by default), I'd vote for a dynamic initialization of the
> database from reference (Python ?) file(s).

The unicodedatabase module contains the Unicode database
as static C data - this makes it shareable among (Python)
processes.

Python modules don't provide this feature: instead a dictionary
would have to be built on import which would increase the heap
size considerably. Those dicts would *not* be shareable.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/