Skip to content

Commit 6ce91f4

Browse files
committed
Partial
1 parent 21d2a03 commit 6ce91f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ from functools import partial
827827
>>> multiply_by_3(10)
828828
30
829829
```
830-
* **Partial is useful in cases when a function needs to be passed as an argument, because it enables us to set the arguments beforehand.**
830+
* **Partial is also useful in cases when a function needs to be passed as an argument, because it enables us to set its arguments beforehand.**
831831
* **A few examples being `'defaultdict(<function>)'`, `'iter(<function>, to_exclusive)'` and dataclass's `'field(default_factory=<function>)'`.**
832832

833833
### Nonlocal

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ <h3 id="partial">Partial</h3>
802802
<span class="hljs-number">30</span>
803803
</code></pre>
804804
<ul>
805-
<li><strong>Partial is useful in cases when a function needs to be passed as an argument, because it enables us to set the arguments beforehand.</strong></li>
805+
<li><strong>Partial is also useful in cases when a function needs to be passed as an argument, because it enables us to set its arguments beforehand.</strong></li>
806806
<li><strong>A few examples being <code class="python hljs"><span class="hljs-string">'defaultdict(&lt;function&gt;)'</span></code>, <code class="python hljs"><span class="hljs-string">'iter(&lt;function&gt;, to_exclusive)'</span></code> and dataclass's <code class="python hljs"><span class="hljs-string">'field(default_factory=&lt;function&gt;)'</span></code>.</strong></li>
807807
</ul>
808808
<h3 id="nonlocal">Nonlocal</h3>

0 commit comments

Comments
 (0)