提交 a5d97431 authored 作者: James Bergstra's avatar James Bergstra

added some function documentation for ModuleCache.module_from_key

上级 77d8c018
...@@ -346,6 +346,11 @@ class ModuleCache(object): ...@@ -346,6 +346,11 @@ class ModuleCache(object):
compilelock.release_lock() compilelock.release_lock()
def module_from_key(self, key, fn=None): def module_from_key(self, key, fn=None):
"""
:param fn: a callable object that will return a module for the key (it is called only if the key isn't in
the cache). This function will be called with a single keyword argument "location"
that is a path on the filesystem wherein the function should write the module.
"""
rval = None rval = None
try: try:
_version, _rest = key _version, _rest = key
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论