gh-96346: Use double caching for re._compile() by serhiy-storchaka · Pull Request #96347 · python/cpython
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be an explanation why OrderedDict is not used at first place, no?
Also, I was afraid that some new contributor passing through the code and not aware about the history of this code can submit a PR with an "obvious" improvement, and it can be merged while I am not here. The history of this code contains many changes and reversions.
I removed this, and hope the new comment about next(iter(_cache)) will be enough.