From d4b9f601ff6958fd1e8964fb058e4157abd26ec9 Mon Sep 17 00:00:00 2001 From: Alexander Schepanovski Date: Thu, 9 Mar 2023 16:54:08 +0700 Subject: [PATCH] Update @memoize and @cache signatures in docs --- docs/calc.rst | 4 ++-- docs/descriptions.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/calc.rst b/docs/calc.rst index 3bc1a69..753f206 100644 --- a/docs/calc.rst +++ b/docs/calc.rst @@ -1,7 +1,7 @@ Calculation =========== -.. decorator:: memoize(key_func=None) +.. decorator:: memoize(*, key_func=None) Memoizes decorated function results, trading memory for performance. Can skip memoization for failed calculation attempts:: @@ -61,7 +61,7 @@ Calculation Same as :func:`@make_lookuper`, but returns ``None`` on memory miss. -.. decorator:: cache(timeout, key_func=None) +.. decorator:: cache(timeout, *, key_func=None) Caches decorated function results for ``timeout``. It can be either number of seconds or :class:`py3:datetime.timedelta`:: diff --git a/docs/descriptions.html b/docs/descriptions.html index 823bd36..7d7818d 100644 --- a/docs/descriptions.html +++ b/docs/descriptions.html @@ -784,11 +784,11 @@
- @memoize

+ @memoize(*, key_func=None)

Memoizes a decorated function results.
- @cache(timeout)

+ @cache(timeout, *, key_func=None)

Caches a function results for timeout seconds.