Skip to content

Commit

Permalink
Added docstring.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCBell committed Mar 29, 2019
1 parent 7100b6c commit e63136d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions curver/kernel/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def memoizable(cls):
''' A class decorator that add the 'set_cache' method to a class. '''

def set_cache(self, function, answer, *args, **kwargs):
''' Set self._cache so that self.function(*args, **kwargs) returns `answer`. '''

inputs = inspect.getcallargs(function, *args, **kwargs) # pylint: disable=deprecated-method
self = inputs.pop('self')

Expand Down

0 comments on commit e63136d

Please sign in to comment.