New submission from Raymond Hettinger: Call __len__ directly inside the LRU cache code rather than using len(). This helps further encapsulate the cache internals making it less dependent on parts of the environment that are subject to change.
---------- assignee: serhiy.storchaka components: Library (Lib) files: fix_lru_len_reentrancy.diff keywords: patch messages: 283426 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Fix obscure lru_cache reentrancy bug type: behavior versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45927/fix_lru_len_reentrancy.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28991> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com