This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients Anders.Hovmöller, brett.cannon, ezio.melotti, malin, michael.foord, rhettinger, serhiy.storchaka
Date 2019-04-02.01:05:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1554167133.7.0.44356978194.issue36485@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2019-04-02 01:05:33rhettingersetrecipients: + rhettinger, brett.cannon, ezio.melotti, michael.foord, serhiy.storchaka, Anders.Hovmöller, malin
2019-04-02 01:05:33rhettingersetmessageid: <1554167133.7.0.44356978194.issue36485@roundup.psfhosted.org>
2019-04-02 01:05:33rhettingerlinkissue36485 messages
2019-04-02 01:05:33rhettingercreate