From 1d8e4efdc7237d620bbdb0fe7ffa47fc722fbcfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Thu, 9 Jan 2020 00:16:36 +0100 Subject: [PATCH] Small fixes --- README.md | 6 ++++-- index.html | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f76ca2c..3292064 100644 --- a/README.md +++ b/README.md @@ -1261,7 +1261,9 @@ class MySequence: * **Extending it generates iter(), contains(), reversed(), index(), and count().** * **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.** ```python -class MyAbcSequence(collections.abc.Sequence): +from collections import abc + +class MyAbcSequence(abc.Sequence): def __init__(self, a): self.a = a def __len__(self): @@ -1377,7 +1379,7 @@ except (, ...) as : ```python raise raise () -raise ( [, ...]) +raise ( [, ...]) ``` #### Re-raising caught exception: diff --git a/index.html b/index.html index 5427a89..d07de95 100644 --- a/index.html +++ b/index.html @@ -1195,7 +1195,9 @@ Hello World!
  • It's a richer interface than the basic sequence.
  • Extending it generates iter(), contains(), reversed(), index(), and count().
  • 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.
  • -
    class MyAbcSequence(collections.abc.Sequence):
    +
    from collections import abc
    +
    +class MyAbcSequence(abc.Sequence):
         def __init__(self, a):
             self.a = a
         def __len__(self):
    @@ -1293,7 +1295,7 @@ LogicOp = Enum('LogicOp', {Raising Exceptions
    raise <exception>
     raise <exception>()
    -raise <exception>(<el_1> [, ...])
    +raise <exception>(<el> [, ...])
     

    Re-raising caught exception:

    except <exception>: