Skip to content

Commit 1232737

Browse files
committed
Small fixes
1 parent 3cf7f44 commit 1232737

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,6 @@ class MySequence:
12601260
* **It's a richer interface than the basic sequence.**
12611261
* **Extending it generates iter(), contains(), reversed(), index(), and count().**
12621262
* **Unlike `'abc.Iterable'` and `'abc.Collection'`, it is not a duck type. That is why `'issubclass(MySequence, collections.abc.Sequence)'` would return False even if MySequence had all the methods defined.**
1263-
12641263
```python
12651264
class MyAbcSequence(collections.abc.Sequence):
12661265
def __init__(self, a):
@@ -1378,8 +1377,7 @@ except (<exception>, ...) as <name>:
13781377
```python
13791378
raise <exception>
13801379
raise <exception>()
1381-
raise <exception>(<el>)
1382-
raise <exception>(<el>, ...)
1380+
raise <exception>(<el_1> [, ...])
13831381
```
13841382

13851383
#### Re-raising caught exception:
@@ -1407,9 +1405,9 @@ BaseException
14071405
| +-- ZeroDivisionError # Raised when dividing by zero.
14081406
+-- AttributeError # Raised when an attribute is missing.
14091407
+-- EOFError # Raised by input() when it hits end-of-file condition.
1410-
+-- LookupError # Raised when a look-up on a sequence or dict fails.
1408+
+-- LookupError # Raised when a look-up on a collection fails.
14111409
| +-- IndexError # Raised when a sequence index is out of range.
1412-
| +-- KeyError # Raised when a dictionary key is not found.
1410+
| +-- KeyError # Raised when a dictionary key or set element is not found.
14131411
+-- NameError # Raised when a variable name is not found.
14141412
+-- OSError # Failures such as “file not found” or “disk full”.
14151413
| +-- FileNotFoundError # When a file or directory is requested but doesn't exist.
@@ -1467,7 +1465,7 @@ Input
14671465
```
14681466
* **Trailing newline gets stripped.**
14691467
* **Prompt string is printed to the standard output before reading input.**
1470-
* **Raises EOFError when user hits EOF or input stream gets exhausted.**
1468+
* **Raises EOFError when user hits EOF (ctrl-d) or input stream gets exhausted.**
14711469

14721470

14731471
Command Line Arguments

index.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,8 +1293,7 @@
12931293
</ul>
12941294
<div><h3 id="raisingexceptions">Raising Exceptions</h3><pre><code class="python language-python hljs"><span class="hljs-keyword">raise</span> &lt;exception&gt;
12951295
<span class="hljs-keyword">raise</span> &lt;exception&gt;()
1296-
<span class="hljs-keyword">raise</span> &lt;exception&gt;(&lt;el&gt;)
1297-
<span class="hljs-keyword">raise</span> &lt;exception&gt;(&lt;el&gt;, ...)
1296+
<span class="hljs-keyword">raise</span> &lt;exception&gt;(&lt;el_1&gt; [, ...])
12981297
</code></pre></div>
12991298

13001299
<div><h4 id="reraisingcaughtexception">Re-raising caught exception:</h4><pre><code class="python language-python hljs"><span class="hljs-keyword">except</span> &lt;exception&gt;:
@@ -1316,9 +1315,9 @@
13161315
| +-- ZeroDivisionError # Raised when dividing by zero.
13171316
+-- AttributeError # Raised when an attribute is missing.
13181317
+-- EOFError # Raised by input() when it hits end-of-file condition.
1319-
+-- LookupError # Raised when a look-up on a sequence or dict fails.
1318+
+-- LookupError # Raised when a look-up on a collection fails.
13201319
| +-- IndexError # Raised when a sequence index is out of range.
1321-
| +-- KeyError # Raised when a dictionary key is not found.
1320+
| +-- KeyError # Raised when a dictionary key or set element is not found.
13221321
+-- NameError # Raised when a variable name is not found.
13231322
+-- OSError # Failures such as “file not found” or “disk full”.
13241323
| +-- FileNotFoundError # When a file or directory is requested but doesn't exist.
@@ -1367,7 +1366,7 @@
13671366
<ul>
13681367
<li><strong>Trailing newline gets stripped.</strong></li>
13691368
<li><strong>Prompt string is printed to the standard output before reading input.</strong></li>
1370-
<li><strong>Raises EOFError when user hits EOF or input stream gets exhausted.</strong></li>
1369+
<li><strong>Raises EOFError when user hits EOF (ctrl-d) or input stream gets exhausted.</strong></li>
13711370
</ul>
13721371
<div><h2 id="commandlinearguments"><a href="#commandlinearguments" name="commandlinearguments">#</a>Command Line Arguments</h2><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> sys
13731372
script_name = sys.argv[<span class="hljs-number">0</span>]

0 commit comments

Comments
 (0)