Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
Quick question, would the existing sys.reload() logic suffice? -- mymodule.py -- cache = {} # On reload, this would clear the cache def f(x): if x in cache: return cache[x] y = x**2 cache[x] = y return y ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36485> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com