You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1260,7 +1260,6 @@ class MySequence:
1260
1260
***It's a richer interface than the basic sequence.**
1261
1261
***Extending it generates iter(), contains(), reversed(), index(), and count().**
1262
1262
***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
-
1264
1263
```python
1265
1264
classMyAbcSequence(collections.abc.Sequence):
1266
1265
def__init__(self, a):
@@ -1378,8 +1377,7 @@ except (<exception>, ...) as <name>:
1378
1377
```python
1379
1378
raise<exception>
1380
1379
raise<exception>()
1381
-
raise<exception>(<el>)
1382
-
raise<exception>(<el>, ...)
1380
+
raise<exception>(<el_1> [, ...])
1383
1381
```
1384
1382
1385
1383
#### Re-raising caught exception:
@@ -1407,9 +1405,9 @@ BaseException
1407
1405
| +-- ZeroDivisionError # Raised when dividing by zero.
1408
1406
+-- AttributeError # Raised when an attribute is missing.
1409
1407
+-- 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.
1411
1409
| +-- 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.
1413
1411
+-- NameError # Raised when a variable name is not found.
1414
1412
+-- OSError # Failures such as “file not found” or “disk full”.
1415
1413
| +-- FileNotFoundError # When a file or directory is requested but doesn't exist.
@@ -1467,7 +1465,7 @@ Input
1467
1465
```
1468
1466
***Trailing newline gets stripped.**
1469
1467
***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.**
0 commit comments