Hi, HN. A few days ago, I discovered that `del list[index]` never reallocates the underlying array (anyone familiar with data structures knows what I mean) starting with 3.13.0a5. I posted an issue, and then, as requested by a member of the Python organization, I also submitted a PR.
However, to my great surprise, they initially tried to dismiss the issue by claiming "it is not a bug", then "the fix is too slow" (the comparison with `list.pop(index)` was completely ignored), and later "it is specific to free threading" (it is not). In a new PR from another Python team member, they propose not shrinking small lists for every operation at all.
I invite you to assess the situation for yourselves and decide whether this is really the right approach.
x42005e1f•1h ago
However, to my great surprise, they initially tried to dismiss the issue by claiming "it is not a bug", then "the fix is too slow" (the comparison with `list.pop(index)` was completely ignored), and later "it is specific to free threading" (it is not). In a new PR from another Python team member, they propose not shrinking small lists for every operation at all.
I invite you to assess the situation for yourselves and decide whether this is really the right approach.