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

Skip to content

Commit 14233c4

Browse files
committed
Grammar
1 parent 9af8d0b commit 14233c4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,7 +1802,7 @@ import csv
18021802
```python
18031803
<reader> = csv.reader(<file>) # Also: `dialect='excel', delimiter=','`.
18041804
<list> = next(<reader>) # Returns next row as a list of strings.
1805-
<list> = list(<reader>) # Returns list of remaining rows.
1805+
<list> = list(<reader>) # Returns a list of remaining rows.
18061806
```
18071807
* **File must be opened with a `'newline=""'` argument, or newlines embedded inside quoted fields will not be interpreted correctly!**
18081808

@@ -1928,7 +1928,7 @@ Bytes
19281928

19291929
```python
19301930
<bytes> = b'<str>' # Only accepts ASCII characters and \x00-\xff.
1931-
<int> = <bytes>[<index>] # Returns int in range from 0 to 255.
1931+
<int> = <bytes>[<index>] # Returns an int in range from 0 to 255.
19321932
<bytes> = <bytes>[<slice>] # Returns bytes even if it has only one element.
19331933
<bytes> = <bytes>.join(<coll_of_bytes>) # Joins elements using bytes as a separator.
19341934
```
@@ -2044,7 +2044,7 @@ Memory View
20442044
```
20452045

20462046
```python
2047-
<list> = list(<mview>) # Returns list of ints or floats.
2047+
<list> = list(<mview>) # Returns a list of ints or floats.
20482048
<str> = str(<mview>, 'utf-8') # Treats mview as a bytes object.
20492049
<int> = int.from_bytes(<mview>, …) # `byteorder='big/little', signed=False`.
20502050
'<hex>' = <mview>.hex() # Treats mview as a bytes object.

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@
14961496

14971497
<div><h3 id="read">Read</h3><pre><code class="python language-python hljs">&lt;reader&gt; = csv.reader(&lt;file&gt;) <span class="hljs-comment"># Also: `dialect='excel', delimiter=','`.</span>
14981498
&lt;list&gt; = next(&lt;reader&gt;) <span class="hljs-comment"># Returns next row as a list of strings.</span>
1499-
&lt;list&gt; = list(&lt;reader&gt;) <span class="hljs-comment"># Returns list of remaining rows.</span>
1499+
&lt;list&gt; = list(&lt;reader&gt;) <span class="hljs-comment"># Returns a list of remaining rows.</span>
15001500
</code></pre></div>
15011501

15021502
<ul>
@@ -1597,7 +1597,7 @@
15971597

15981598

15991599
<div><h2 id="bytes"><a href="#bytes" name="bytes">#</a>Bytes</h2><p><strong>Bytes object is an immutable sequence of single bytes. Mutable version is called bytearray.</strong></p><pre><code class="python language-python hljs">&lt;bytes&gt; = <span class="hljs-string">b'&lt;str&gt;'</span> <span class="hljs-comment"># Only accepts ASCII characters and \x00-\xff.</span>
1600-
&lt;int&gt; = &lt;bytes&gt;[&lt;index&gt;] <span class="hljs-comment"># Returns int in range from 0 to 255.</span>
1600+
&lt;int&gt; = &lt;bytes&gt;[&lt;index&gt;] <span class="hljs-comment"># Returns an int in range from 0 to 255.</span>
16011601
&lt;bytes&gt; = &lt;bytes&gt;[&lt;slice&gt;] <span class="hljs-comment"># Returns bytes even if it has only one element.</span>
16021602
&lt;bytes&gt; = &lt;bytes&gt;.join(&lt;coll_of_bytes&gt;) <span class="hljs-comment"># Joins elements using bytes as a separator.</span>
16031603
</code></pre></div>
@@ -1691,7 +1691,7 @@
16911691
&lt;file&gt;.write(&lt;mview&gt;) <span class="hljs-comment"># Writes mview to the binary file.</span>
16921692
</code></pre></div>
16931693

1694-
<pre><code class="python language-python hljs">&lt;list&gt; = list(&lt;mview&gt;) <span class="hljs-comment"># Returns list of ints or floats.</span>
1694+
<pre><code class="python language-python hljs">&lt;list&gt; = list(&lt;mview&gt;) <span class="hljs-comment"># Returns a list of ints or floats.</span>
16951695
&lt;str&gt; = str(&lt;mview&gt;, <span class="hljs-string">'utf-8'</span>) <span class="hljs-comment"># Treats mview as a bytes object.</span>
16961696
&lt;int&gt; = int.from_bytes(&lt;mview&gt;, …) <span class="hljs-comment"># `byteorder='big/little', signed=False`.</span>
16971697
<span class="hljs-string">'&lt;hex&gt;'</span> = &lt;mview&gt;.hex() <span class="hljs-comment"># Treats mview as a bytes object.</span>

0 commit comments

Comments
 (0)