GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — bpo-28293: The regex cache no longer completely dump when full. by serhiy-storchaka · Pull Request #3768 · python/cpython Conversation
|
| if len(_cache) >= _MAXCACHE: | ||
| _cache.clear() | ||
| try: | ||
| _cache.popitem(False) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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.)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'm reworking my deferred compilation branch to add a new function, so I might just fold this simple change into that branch.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Never mind; I'm abandoning the deferred compilation branch, so #3791
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.