This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes, gvanrossum, mark
Date 2007-11-30.13:43:22
SpamBayes Score 0.11477832
Marked as misclassified No
Message-id <1196430202.43.0.311695577054.issue1109@psf.upfronthosting.co.za>
In-reply-to
Content
Are you fine with the error message or do you have a better one?

Index: Lib/abc.py
===================================================================
--- Lib/abc.py  (Revision 59228)
+++ Lib/abc.py  (Arbeitskopie)
@@ -137,8 +137,12 @@
         cls._abc_negative_cache_version = ABCMeta._abc_invalidation_counter
         return cls

-    def register(cls, subclass):
+    def register(cls, subclass=None):
         """Register a virtual subclass of an ABC."""
+        if subclass is None:
+            raise TypeError("register() cannot be called on an ABCMeta "
+                "subclass. Maybe you forgot the metaclass keyword
argument "
+                "when declaring the class?")
         if not isinstance(cls, type):
             raise TypeError("Can only register classes")
         if issubclass(subclass, cls):
History
Date User Action Args
2007-11-30 13:43:22christian.heimessetspambayes_score: 0.114778 -> 0.11477832
recipients: + christian.heimes, gvanrossum, mark
2007-11-30 13:43:22christian.heimessetspambayes_score: 0.114778 -> 0.114778
messageid: <1196430202.43.0.311695577054.issue1109@psf.upfronthosting.co.za>
2007-11-30 13:43:22christian.heimeslinkissue1109 messages
2007-11-30 13:43:22christian.heimescreate