Commit d620d530 authored by Médéric Boquien's avatar Médéric Boquien

Slight rewriting of the comments for grammar/PEP8.

parent 0ae585f3
...@@ -17,7 +17,7 @@ class SedWarehouse(object): ...@@ -17,7 +17,7 @@ class SedWarehouse(object):
""" """
def __init__(self, cache_type="memory", nocache=None): def __init__(self, cache_type="memory", nocache=None):
"""Instantiate a SED warehouse """Instantiate an SED warehouse
Parameters Parameters
---------- ----------
...@@ -85,12 +85,12 @@ class SedWarehouse(object): ...@@ -85,12 +85,12 @@ class SedWarehouse(object):
def partial_clear_cache(self, n_modules_max): def partial_clear_cache(self, n_modules_max):
"""Clear the cache of SEDs that are not relevant anymore """Clear the cache of SEDs that are not relevant anymore
To do partial clearing of the cache, we go through the entire cache and To do partial clearing of the cache, we go through the entire cache
delete the SEDs that have more than a given number of modules. This is and delete the SEDs that have more than a given number of modules.
done by computing the index of the module that has a changed parameter. This is done by computing the index of the module that has a changed
This means that SEDs with this number of modules or more are not needed parameter. This means that SEDs with this number of modules or more
anymore to compute new models and we can discard them. Passing 0 as an are not needed anymore to compute new models and we can discard them.
argument empties the cache completely. Passing 0 as an argument empties the cache completely.
Parameters Parameters
---------- ----------
...@@ -130,8 +130,8 @@ class SedWarehouse(object): ...@@ -130,8 +130,8 @@ class SedWarehouse(object):
module_list = list(module_list) module_list = list(module_list)
parameter_list = list(parameter_list) parameter_list = list(parameter_list)
# Marshal a tuple (module_list, parameter_list) to be used as a key for # Marshal a tuple (module_list, parameter_list) to be used as a key
# storing the SED in the cache. # for storing the SED in the cache.
sed_key = marshal.dumps((module_list, parameter_list)) sed_key = marshal.dumps((module_list, parameter_list))
sed = self.storage.get(sed_key) sed = self.storage.get(sed_key)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment