summaryrefslogtreecommitdiffstats
path: root/Lib/abc.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-30 15:13:13 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-11-30 15:13:13 (GMT)
commit45031dfd1c37fca6361e881d56f4e62f800af91a (patch)
tree7c82c8ea5dd3b01dd12cf7df4167018bc862acf7 /Lib/abc.py
parent7d2ff884eeb636fcd30ebd2f9886c4b46e8545bc (diff)
downloadcpython-45031dfd1c37fca6361e881d56f4e62f800af91a.zip
cpython-45031dfd1c37fca6361e881d56f4e62f800af91a.tar.gz
cpython-45031dfd1c37fca6361e881d56f4e62f800af91a.tar.bz2
Backmerge -r59233:59232
Guido said: Please roll this back. The error message you added is inappropriate when the parameter to a legitimate register() call is omitted, e.g. collections.Sequence.register()
Diffstat (limited to 'Lib/abc.py')
-rw-r--r--Lib/abc.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/abc.py b/Lib/abc.py
index 30bb6b0..54dc8e2 100644
--- a/Lib/abc.py
+++ b/Lib/abc.py
@@ -137,11 +137,8 @@ class ABCMeta(type):
cls._abc_negative_cache_version = ABCMeta._abc_invalidation_counter
return cls
- def register(cls, subclass=None):
+ def register(cls, subclass):
"""Register a virtual subclass of an ABC."""
- if subclass is None:
- raise TypeError("register() cannot be called on an ABCMeta "
- "subclass, use class Example(metaclass=abc.ABCMeta) instead.")
if not isinstance(cls, type):
raise TypeError("Can only register classes")
if issubclass(subclass, cls):