New submission from Raymond Hettinger: Since the ordering of keyword arguments is now guaranteed, the LRU cache doesn't need to sort any longer.
The will give a small change in behavior that I don't care about. A call f(a=1, b=2) would now be cached separately from f(b=2, a=1). That won't arise often and isn't really different than the status quo where f(1, b=2) or f(1, 2) are already cached separately. Overall it is a net win by saving the sorting step on every call. ---------- assignee: serhiy.storchaka components: Library (Lib) files: lru_468.diff keywords: patch messages: 284971 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: With PEP 468, the lru cache not longer needs to sort keyword args type: performance versions: Python 3.7 Added file: http://bugs.python.org/file46210/lru_468.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29203> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com