New GitHub issue #96019 from cfbolz:<br>

<hr>

<pre>
I was reading `makeunicodedata.py` and found a small issue that leads to a bit of wasted space in the `unicodedata` module. This [code](https://github.com/python/cpython/blob/main/Tools/unicode/makeunicodedata.py#L211):

```python
                try:
                    i = decomp_data.index(decomp)
                except ValueError:
                    i = len(decomp_data)
                    decomp_data.extend(decomp)
                    decomp_size = decomp_size + len(decomp) * 2
```

will always take the exception path because both `decomp_data` and `decomp` are lists of ints, so the `index` call always raises. I think it was copy-pasted from some similar code a [few lines up](https://github.com/python/cpython/blob/main/Tools/unicode/makeunicodedata.py#L194) 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.
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/96019">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>