Skip to content

Commit 7722824

Browse files
committed
Decorator
1 parent b976dd5 commit 7722824

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ def debug(func):
904904
def add(x, y):
905905
return x + y
906906
```
907-
* **Wraps is a helper decorator that copies the metadata of a passed function (func) to the function it is wrapping (out).**
907+
* **Wraps is a helper decorator that copies the metadata of the passed function (func) to the function it is wrapping (out).**
908908
* **Without it `'add.__name__'` would return `'out'`.**
909909

910910
### LRU Cache
@@ -918,7 +918,7 @@ def fib(n):
918918
return n if n < 2 else fib(n-2) + fib(n-1)
919919
```
920920

921-
* **Recursion depth is limited to 1000 by default. To increase it use `'sys.setrecursionlimit(<depth>)'`.**
921+
* **In CPython recursion depth is limited to 1000 by default. To increase it use `'sys.setrecursionlimit(<depth>)'`.**
922922

923923
### Parametrized Decorator
924924
**A decorator that accepts arguments and returns a normal decorator that accepts a function.**

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@
882882

883883

884884
<ul>
885-
<li><strong>Wraps is a helper decorator that copies the metadata of a passed function (func) to the function it is wrapping (out).</strong></li>
885+
<li><strong>Wraps is a helper decorator that copies the metadata of the passed function (func) to the function it is wrapping (out).</strong></li>
886886
<li><strong>Without it <code class="python hljs"><span class="hljs-string">'add.__name__'</span></code> would return <code class="python hljs"><span class="hljs-string">'out'</span></code>.</strong></li>
887887
</ul>
888888
<div><h3 id="lrucache">LRU Cache</h3><p><strong>Decorator that caches function's return values. All function's arguments must be hashable.</strong></p><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> functools <span class="hljs-keyword">import</span> lru_cache
@@ -894,7 +894,7 @@
894894

895895

896896
<ul>
897-
<li><strong>Recursion depth is limited to 1000 by default. To increase it use <code class="python hljs"><span class="hljs-string">'sys.setrecursionlimit(&lt;depth&gt;)'</span></code>.</strong></li>
897+
<li><strong>In CPython recursion depth is limited to 1000 by default. To increase it use <code class="python hljs"><span class="hljs-string">'sys.setrecursionlimit(&lt;depth&gt;)'</span></code>.</strong></li>
898898
</ul>
899899
<div><h3 id="parametrizeddecorator">Parametrized Decorator</h3><p><strong>A decorator that accepts arguments and returns a normal decorator that accepts a function.</strong></p><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> functools <span class="hljs-keyword">import</span> wraps
900900

0 commit comments

Comments
 (0)