Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
Closed
Description
I was readingmakeunicodedata.py
and found a small issue that leads to a bit of wasted space in theunicodedata
module. Thiscode:
try:i=decomp_data.index(decomp)exceptValueError:i=len(decomp_data)decomp_data.extend(decomp)decomp_size=decomp_size+len(decomp)*2
will always take the exception path because bothdecomp_data
anddecomp
are lists of ints, so theindex
call always raises. I think it was copy-pasted from some similar code afew lines up which however is about a lists of strings and a string, so it works there.
I will prepare a PR. The space saving isn't gigantic (about 4.5kib) but as it stands the code is confusing.