Skip to content

Commit c5bfdb0

Browse files
committed
Typos
1 parent 5dd0421 commit c5bfdb0

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,22 +1943,22 @@ Array
19431943

19441944
```python
19451945
from array import array
1946-
<array> = array('<typecode>', <collection>) # Array from coll. of numbers.
1947-
<array> = array('<typecode>', <bytes>) # Array from bytes object.
1946+
<array> = array('<typecode>', <collection>) # Array from coll. of numbers.
1947+
<array> = array('<typecode>', <bytes>) # Array from bytes object.
19481948
<bytes> = <array>.tobytes()
19491949
```
19501950

19511951

19521952
Memory View
19531953
-----------
1954-
* **A seqence object that points to the memory of another object.**
1954+
* **A sequence object that points to the memory of another object.**
19551955
* **Each element can reference a single or multiple consecutive bytes, depending on format.**
19561956
* **Order and number of elements can be changed with slicing.**
19571957

19581958
```python
19591959
<mview> = memoryview(<bytes/bytearray/array>)
19601960
<num> = <mview>[<index>] # Can be int or float.
1961-
<mview> = <mview>[<slice>] # Mview with rearanged elements.
1961+
<mview> = <mview>[<slice>] # Mview with rearranged elements.
19621962
<mview> = <mview>.cast('<typecode>') # Casts a memoryview to a new format.
19631963
<mview>.release() # Releases the object's memory buffer.
19641964
```
@@ -1984,10 +1984,10 @@ from collections import deque
19841984
```
19851985

19861986
```python
1987-
<deque>.appendleft(<el>) # Opposite element is dropped if full.
1988-
<el> = <deque>.popleft() # Raises IndexError if empty.
1989-
<deque>.extendleft(<collection>) # Collection gets reversed.
1990-
<deque>.rotate(n=1) # Rotates elements to the right.
1987+
<deque>.appendleft(<el>) # Opposite element is dropped if full.
1988+
<el> = <deque>.popleft() # Raises IndexError if empty.
1989+
<deque>.extendleft(<collection>) # Collection gets reversed.
1990+
<deque>.rotate(n=1) # Rotates elements to the right.
19911991
```
19921992

19931993

@@ -2286,7 +2286,7 @@ with open('test.csv', encoding='utf-8', newline='') as file:
22862286

22872287
Curses
22882288
------
2289-
#### Clears terminal, prints message and waits for ESC key press:
2289+
#### Clears the terminal, prints a message and waits for an ESC key press:
22902290
```python
22912291
from curses import wrapper, curs_set, ascii
22922292
from curses import KEY_UP, KEY_RIGHT, KEY_DOWN, KEY_LEFT

index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,19 +1723,19 @@
17231723

17241724

17251725
<div><h2 id="array"><a href="#array" name="array">#</a>Array</h2><p><strong>List that can only hold numbers of a predefined type. Available types and their sizes in bytes are listed above.</strong></p><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> array <span class="hljs-keyword">import</span> array
1726-
&lt;array&gt; = array(<span class="hljs-string">'&lt;typecode&gt;'</span>, &lt;collection&gt;) <span class="hljs-comment"># Array from coll. of numbers.</span>
1727-
&lt;array&gt; = array(<span class="hljs-string">'&lt;typecode&gt;'</span>, &lt;bytes&gt;) <span class="hljs-comment"># Array from bytes object.</span>
1726+
&lt;array&gt; = array(<span class="hljs-string">'&lt;typecode&gt;'</span>, &lt;collection&gt;) <span class="hljs-comment"># Array from coll. of numbers.</span>
1727+
&lt;array&gt; = array(<span class="hljs-string">'&lt;typecode&gt;'</span>, &lt;bytes&gt;) <span class="hljs-comment"># Array from bytes object.</span>
17281728
&lt;bytes&gt; = &lt;array&gt;.tobytes()
17291729
</code></pre></div>
17301730

17311731

17321732
<div><h2 id="memoryview"><a href="#memoryview" name="memoryview">#</a>Memory View</h2><ul>
1733-
<li><strong>A seqence object that points to the memory of another object.</strong></li>
1733+
<li><strong>A sequence object that points to the memory of another object.</strong></li>
17341734
<li><strong>Each element can reference a single or multiple consecutive bytes, depending on format.</strong></li>
17351735
<li><strong>Order and number of elements can be changed with slicing.</strong></li>
17361736
</ul><pre><code class="python language-python hljs">&lt;mview&gt; = memoryview(&lt;bytes/bytearray/array&gt;)
17371737
&lt;num&gt; = &lt;mview&gt;[&lt;index&gt;] <span class="hljs-comment"># Can be int or float.</span>
1738-
&lt;mview&gt; = &lt;mview&gt;[&lt;slice&gt;] <span class="hljs-comment"># Mview with rearanged elements.</span>
1738+
&lt;mview&gt; = &lt;mview&gt;[&lt;slice&gt;] <span class="hljs-comment"># Mview with rearranged elements.</span>
17391739
&lt;mview&gt; = &lt;mview&gt;.cast(<span class="hljs-string">'&lt;typecode&gt;'</span>) <span class="hljs-comment"># Casts a memoryview to a new format.</span>
17401740
&lt;mview&gt;.release() <span class="hljs-comment"># Releases the object's memory buffer.</span>
17411741
</code></pre></div>
@@ -1754,10 +1754,10 @@
17541754
</code></pre></div>
17551755

17561756

1757-
<pre><code class="python language-python hljs">&lt;deque&gt;.appendleft(&lt;el&gt;) <span class="hljs-comment"># Opposite element is dropped if full.</span>
1758-
&lt;el&gt; = &lt;deque&gt;.popleft() <span class="hljs-comment"># Raises IndexError if empty.</span>
1759-
&lt;deque&gt;.extendleft(&lt;collection&gt;) <span class="hljs-comment"># Collection gets reversed.</span>
1760-
&lt;deque&gt;.rotate(n=<span class="hljs-number">1</span>) <span class="hljs-comment"># Rotates elements to the right.</span>
1757+
<pre><code class="python language-python hljs">&lt;deque&gt;.appendleft(&lt;el&gt;) <span class="hljs-comment"># Opposite element is dropped if full.</span>
1758+
&lt;el&gt; = &lt;deque&gt;.popleft() <span class="hljs-comment"># Raises IndexError if empty.</span>
1759+
&lt;deque&gt;.extendleft(&lt;collection&gt;) <span class="hljs-comment"># Collection gets reversed.</span>
1760+
&lt;deque&gt;.rotate(n=<span class="hljs-number">1</span>) <span class="hljs-comment"># Rotates elements to the right.</span>
17611761
</code></pre>
17621762
<div><h2 id="threading"><a href="#threading" name="threading">#</a>Threading</h2><ul>
17631763
<li><strong>CPython interpreter can only run a single thread at a time.</strong></li>
@@ -1974,7 +1974,7 @@
19741974
</code></pre></div></div>
19751975

19761976

1977-
<div><h2 id="curses"><a href="#curses" name="curses">#</a>Curses</h2><div><h4 id="clearsterminalprintsmessageandwaitsforesckeypress">Clears terminal, prints message and waits for ESC key press:</h4><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> curses <span class="hljs-keyword">import</span> wrapper, curs_set, ascii
1977+
<div><h2 id="curses"><a href="#curses" name="curses">#</a>Curses</h2><div><h4 id="clearstheterminalprintsamessageandwaitsforanesckeypress">Clears the terminal, prints a message and waits for an ESC key press:</h4><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> curses <span class="hljs-keyword">import</span> wrapper, curs_set, ascii
19781978
<span class="hljs-keyword">from</span> curses <span class="hljs-keyword">import</span> KEY_UP, KEY_RIGHT, KEY_DOWN, KEY_LEFT
19791979

19801980
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">main</span><span class="hljs-params">()</span>:</span>

0 commit comments

Comments
 (0)