From a10f1c8ded53f9ed185a64895e621d878ea5a285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 1 Oct 2019 19:29:01 +0200 Subject: [PATCH] Decorator --- README.md | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fec5ad2..27cb41e 100644 --- a/README.md +++ b/README.md @@ -900,7 +900,7 @@ def debug(func): def add(x, y): return x + y ``` -* **Wraps is a helper decorator that copies metadata of function func() to function out().** +* **Wraps is a helper decorator that copies the metadata of a passed function (func) to the function it is wrapping (out).** * **Without it `'add.__name__'` would return `'out'`.** ### LRU Cache diff --git a/index.html b/index.html index bf34912..5242c05 100644 --- a/index.html +++ b/index.html @@ -875,7 +875,7 @@ creature = Creature(Point(0, 'add.__name__' would return 'out'.

LRU Cache

Decorator that caches function's return values. All function's arguments must be hashable.

from functools import lru_cache