From fa17225d95e768ab4d9f7a57d498d2389e68af7e Mon Sep 17 00:00:00 2001 From: neingeist Date: Sat, 30 Aug 2014 08:18:42 +0200 Subject: [PATCH] fixup docstrings --- json_memoize.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/json_memoize.py b/json_memoize.py index 1101516..683a137 100644 --- a/json_memoize.py +++ b/json_memoize.py @@ -13,7 +13,7 @@ class HashableDict(dict): def json_memoize(filename): - """Return a decorator that memoizes function calls in a JSON file.""" + """A decorator that memoizes function calls in a JSON file.""" class JsonMemoize: @@ -78,11 +78,13 @@ def is_prime(n): @json_memoize('json_memoize_tmp.json') def multiply(*args): + """Multiply all args.""" return reduce(operator.mul, args, 1) @json_memoize('json_memoize_tmp.json') def some_with_kwargs(one, two, **kwargs): + """Add 'one' and 'two' and all the values of the keyword arguments.""" return one + two + reduce(operator.add, [kwargs[k] for k in kwargs], 0)