Skip to content

Commit 553f8dd

Browse files
committed
Duck types
1 parent 54db446 commit 553f8dd

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
@@ -1146,7 +1146,7 @@ class Counter:
11461146
```
11471147

11481148
#### Python has many different iterator objects:
1149-
* **Objects returned by the [iter()](#iterator) function, such as list\_iterator and set\_iterator.**
1149+
* **Iterators returned by the [iter()](#iterator) function, such as list\_iterator and set\_iterator.**
11501150
* **Objects returned by the [itertools](#itertools) module, such as count, repeat and cycle.**
11511151
* **Generators returned by the [generator functions](#generator) and [generator expressions](#comprehension).**
11521152
* **File objects returned by the [open()](#open) function, etc.**
@@ -1170,7 +1170,7 @@ class Counter:
11701170
```
11711171

11721172
### Context Manager
1173-
* **Enter() should lock the resources and (optionally) return an object.**
1173+
* **Enter() should lock the resources and optionally return an object.**
11741174
* **Exit() should release the resources.**
11751175
* **Any exception that happens inside the with block is passed to the exit() method.**
11761176
* **If it wishes to suppress the exception it must return a true value.**

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@
10931093
(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>)
10941094
</code></pre>
10951095
<div><h4 id="pythonhasmanydifferentiteratorobjects">Python has many different iterator objects:</h4><ul>
1096-
<li><strong>Objects returned by the <a href="#iterator">iter()</a> function, such as list_iterator and set_iterator.</strong></li>
1096+
<li><strong>Iterators returned by the <a href="#iterator">iter()</a> function, such as list_iterator and set_iterator.</strong></li>
10971097
<li><strong>Objects returned by the <a href="#itertools">itertools</a> module, such as count, repeat and cycle.</strong></li>
10981098
<li><strong>Generators returned by the <a href="#generator">generator functions</a> and <a href="#comprehension">generator expressions</a>.</strong></li>
10991099
<li><strong>File objects returned by the <a href="#open">open()</a> function, etc.</strong></li>
@@ -1116,7 +1116,7 @@
11161116
(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>)
11171117
</code></pre>
11181118
<div><h3 id="contextmanager">Context Manager</h3><ul>
1119-
<li><strong>Enter() should lock the resources and (optionally) return an object.</strong></li>
1119+
<li><strong>Enter() should lock the resources and optionally return an object.</strong></li>
11201120
<li><strong>Exit() should release the resources.</strong></li>
11211121
<li><strong>Any exception that happens inside the with block is passed to the exit() method.</strong></li>
11221122
<li><strong>If it wishes to suppress the exception it must return a true value.</strong> </li>

0 commit comments

Comments
 (0)