Skip to content

Commit 25b59f9

Browse files
committed
Decorator
1 parent e895ede commit 25b59f9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ from dateutil.tz import UTC, tzlocal, gettz, resolve_imaginary
601601
```
602602
* **Use `'<D/DT>.weekday()'` to get the day of the week (Mon == 0).**
603603
* **`'fold=1'` means second pass in case of time jumping back for one hour.**
604-
* **`'<DT> = resolve_imaginary(<DT>)'` fixes DTs that fall into missing hour.**
604+
* **`'<DTa> = resolve_imaginary(<DTa>)'` fixes DTs that fall into missing hour.**
605605

606606
### Now
607607
```python
@@ -915,8 +915,7 @@ from functools import lru_cache
915915
def fib(n):
916916
return n if n < 2 else fib(n-2) + fib(n-1)
917917
```
918-
919-
* **In CPython recursion depth is limited to 1000 by default. To increase it use `'sys.setrecursionlimit(<depth>)'`.**
918+
* **CPython interpreter limits recursion depth to 1000 by default. To increase it use `'sys.setrecursionlimit(<depth>)'`.**
920919

921920
### Parametrized Decorator
922921
**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
@@ -656,7 +656,7 @@
656656
<ul>
657657
<li><strong>Use <code class="python hljs"><span class="hljs-string">'&lt;D/DT&gt;.weekday()'</span></code> to get the day of the week (Mon == 0).</strong></li>
658658
<li><strong><code class="python hljs"><span class="hljs-string">'fold=1'</span></code> means second pass in case of time jumping back for one hour.</strong></li>
659-
<li><strong><code class="apache hljs"><code class="python language-python hljs"><span class="hljs-string">'&lt;DT&gt; = resolve_imaginary(&lt;DT&gt;)'</span></code></code> fixes DTs that fall into missing hour.</strong></li>
659+
<li><strong><code class="python hljs"><span class="hljs-string">'&lt;DTa&gt; = resolve_imaginary(&lt;DTa&gt;)'</span></code> fixes DTs that fall into missing hour.</strong></li>
660660
</ul>
661661
<div><h3 id="now">Now</h3><pre><code class="python language-python hljs">&lt;D/DTn&gt; = D/DT.today() <span class="hljs-comment"># Current local date or naive datetime.</span>
662662
&lt;DTn&gt; = DT.utcnow() <span class="hljs-comment"># Naive datetime from current UTC time.</span>
@@ -892,7 +892,7 @@
892892

893893

894894
<ul>
895-
<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>
895+
<li><strong>CPython interpreter limits recursion depth 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>
896896
</ul>
897897
<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
898898

0 commit comments

Comments
 (0)