diff options
Diffstat (limited to 'Lib/abc.py')
-rw-r--r-- | Lib/abc.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3,6 +3,8 @@ """Abstract Base Classes (ABCs) according to PEP 3119.""" +import types + # Instance of old-style class class _C: pass @@ -101,7 +103,7 @@ class ABCMeta(type): def register(cls, subclass): """Register a virtual subclass of an ABC.""" - if not isinstance(subclass, type): + if not isinstance(subclass, (type, types.ClassType)): raise TypeError("Can only register classes") if issubclass(subclass, cls): return # Already a subclass |