[Python-ideas] Extend unicodedata with a name search

Steven D'Aprano steve at pearwood.info
Sat Oct 4 10:18:23 CEST 2014


On Sat, Oct 04, 2014 at 05:13:18PM +1000, Chris Angelico wrote:
[...]
> The big downside, I guess, is the RAM usage.
> 
> >>> sys.getsizeof(names)
> 4892352
> >>> sum(sys.getsizeof(n) for n in names)
> 30698194
> 
> That's ~32MB of stuff stored, just to allow these lookups.

And presumably it is already stored, to support \N{} and 
unicodedata.lookup().

For reference, UnicodeData.txt is a 1.4MB text file.

-- 
Steven


More information about the Python-ideas mailing list