[Python-Dev] [patch #100889] a smaller unicode name database
Fredrik Lundh
Fredrik Lundh" <effbot@telia.com
Sat, 15 Jul 2000 22:29:21 +0200
mal wrote:
> > second, the uninames module provides two public Python functions:
>=20
> I'd name this: unicodenames (we shouldn't be afraid of long
> module names ;-).
ok.
> getname() with an unkown code means that an unassigned
> code is being requested: this is a ValueError.
>=20
> getcode(name) should raise a ValueError exception too, since the
> requested name may be unsupported by Python's version of the
> Unicode lib (vers. 3.0).
ok.
> BTW, did you make the lookups case insensitive ? (Would be
> useful, IMHO.)
sure. both getcode and \N are case insensitive.
> Perhaps a dictionary like interface written on top of
> the above two APIs (in Python, of course).
sounds like something for a "unicodeutils.py" module ;-)
maybe later...
...
if anyone would like to play with this, I just updated the
patch at:
http://w1.132.telia.com/~u13208596/uninames-patch.txt
(the module is renamed, the patch isn't...)
note: the patch doesn't update the build files. Should be
pretty obvious how to do that...
</F>