Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 23f0b7a

Browse files
committed
Coroutines, Pandas
1 parent 13d9744 commit 23f0b7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@
10571057
<div><h3 id="collection">Collection</h3><ul>
10581058
<li><strong>Only required methods are iter() and len().</strong></li>
10591059
<li><strong>This cheatsheet actually means <code class="python hljs"><span class="hljs-string">'&lt;iterable&gt;'</span></code> when it uses <code class="python hljs"><span class="hljs-string">'&lt;collection&gt;'</span></code>.</strong></li>
1060-
<li><strong>I chose not to use the name 'iterable' because it sounds scarier and more vague than 'collection'. The only drawback of this decision is that a reader could think a certain function doesn't accept iterators when it does, since iterators are the only built-in objects that are not collections while being iterable.</strong></li>
1060+
<li><strong>I chose not to use the name 'iterable' because it sounds scarier and more vague than 'collection'. The only drawback of this decision is that a reader could think a certain function doesn't accept iterators when it does, since iterators are the only iterable objects that are not collections.</strong></li>
10611061
</ul><pre><code class="python language-python hljs"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyCollection</span>:</span>
10621062
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span><span class="hljs-params">(self, a)</span>:</span>
10631063
self.a = a
@@ -1319,7 +1319,7 @@
13191319
<ul>
13201320
<li><strong><code class="python hljs"><span class="hljs-string">'encoding=None'</span></code> means that the default encoding is used, which is platform dependent. Best practice is to use <code class="python hljs"><span class="hljs-string">'encoding="utf-8"'</span></code> whenever possible.</strong></li>
13211321
<li><strong><code class="python hljs"><span class="hljs-string">'newline=None'</span></code> means all different end of line combinations are converted to '\n' on read, while on write all '\n' characters are converted to system's default line separator.</strong></li>
1322-
<li><strong><code class="python hljs"><span class="hljs-string">'newline=""'</span></code> means no conversions take place, but input is still broken into chunks by readline() and readlines() on '\n', '\r' and '\r\n'.</strong></li>
1322+
<li><strong><code class="python hljs"><span class="hljs-string">'newline=""'</span></code> means no conversions take place, but input is still broken into chunks by readline() and readlines() on either '\n', '\r' or '\r\n'.</strong></li>
13231323
</ul>
13241324
<div><h3 id="modes">Modes</h3><ul>
13251325
<li><strong><code class="python hljs"><span class="hljs-string">'r'</span></code> - Read (default).</strong></li>
@@ -1330,7 +1330,7 @@
13301330
<li><strong><code class="python hljs"><span class="hljs-string">'r+'</span></code> - Read and write from the start.</strong></li>
13311331
<li><strong><code class="python hljs"><span class="hljs-string">'a+'</span></code> - Read and write from the end.</strong></li>
13321332
<li><strong><code class="python hljs"><span class="hljs-string">'t'</span></code> - Text mode (default).</strong></li>
1333-
<li><strong><code class="python hljs"><span class="hljs-string">'b'</span></code> - Binary mode (must be paired with one of above).</strong></li>
1333+
<li><strong><code class="python hljs"><span class="hljs-string">'b'</span></code> - Binary mode.</strong></li>
13341334
</ul><div><h3 id="exceptions-1">Exceptions</h3><ul>
13351335
<li><strong><code class="python hljs"><span class="hljs-string">'FileNotFoundError'</span></code> can be raised when reading with <code class="python hljs"><span class="hljs-string">'r'</span></code> or <code class="python hljs"><span class="hljs-string">'r+'</span></code>.</strong></li>
13361336
<li><strong><code class="python hljs"><span class="hljs-string">'FileExistsError'</span></code> can be raised when writing with <code class="python hljs"><span class="hljs-string">'x'</span></code>.</strong></li>

0 commit comments

Comments
 (0)