diff --git a/README.md b/README.md index 9c4c3c8..056024d 100644 --- a/README.md +++ b/README.md @@ -1237,7 +1237,7 @@ class MySequence: ### Collections.abc.Sequence * **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 it had all the methods defined.** +* **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): diff --git a/index.html b/index.html index 1d1bea8..8d76bcf 100644 --- a/index.html +++ b/index.html @@ -1152,7 +1152,7 @@ lock = threading.RLock(); with lock: ...
'abc.Iterable'
and 'abc.Collection'
, it is not a duck type. That is why 'issubclass(MySequence, collections.abc.Sequence)'
would return 'False' even if it had all the methods defined.'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):
def __init__(self, a):