Uh oh!
There was an error while loading. Please reload this page.
bpo-28293: The regex cache no longer completely dump when full. - #3768
Conversation
| if len(_cache) >= _MAXCACHE: | ||
| _cache.clear() | ||
| try: | ||
| _cache.popitem(False) |
There was a problem hiding this comment.
Sorry that I'm late to the game in reviewing this, and thanks for fixing this. One comment, should this be
_cache.popitem(last=False)
for readability? (I think if history had been different, we would have made that a keyword-only argument.)
There was a problem hiding this comment.
Maybe. This wouldn't harm performance, because sre_compile.compile() few lines above is much more expensive. Open a new PR for changing this if you will.
There was a problem hiding this comment.
I'm reworking my deferred compilation branch to add a new function, so I might just fold this simple change into that branch.
There was a problem hiding this comment.
Never mind; I'm abandoning the deferred compilation branch, so #3791
https://bugs.python.org/issue28293