From 679430de09d145b45396bd73ca0be58402ef80ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 10 Nov 2020 17:38:14 +0100 Subject: [PATCH] ABC --- README.md | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3671cad..3fb7713 100644 --- a/README.md +++ b/README.md @@ -261,7 +261,7 @@ from types import FunctionType, MethodType, LambdaType, GeneratorType ``` ### Abstract Base Classes -**Each abstract base class specifies a set of virtual subclasses. These classes are then recognized by isinstance() and issubclass() as subclasses of the ABC, although they are really not.** +**Each abstract base class specifies a set of virtual subclasses. These classes are then recognized by isinstance() and issubclass() as subclasses of the ABC, although they are really not. ABC can also manually decide whether or not a specific class is its virtual subclass.** ```python >>> from collections.abc import Sequence, Collection, Iterable diff --git a/index.html b/index.html index 7835492..32d2e81 100644 --- a/index.html +++ b/index.html @@ -402,7 +402,7 @@ to_exclusive = <range>.stop

Some types do not have built-in names, so they must be imported:

from types import FunctionType, MethodType, LambdaType, GeneratorType
 
-

Abstract Base Classes

Each abstract base class specifies a set of virtual subclasses. These classes are then recognized by isinstance() and issubclass() as subclasses of the ABC, although they are really not.

>>> from collections.abc import Sequence, Collection, Iterable
+

Abstract Base Classes

Each abstract base class specifies a set of virtual subclasses. These classes are then recognized by isinstance() and issubclass() as subclasses of the ABC, although they are really not. ABC can also manually decide whether or not a specific class is its virtual subclass.

>>> from collections.abc import Sequence, Collection, Iterable
 >>> isinstance([1, 2, 3], Iterable)
 True