The __subclasscheck__ method of ABCMeta contains the following code:

        # Check if it's a subclass of a registered class (recursive)
        for rcls in cls._abc_registry:
            if issubclass(subclass, rcls):
                cls._abc_registry.add(subclass)
                return True

It looks to me like this code will result in an unnecessary call to
cls._abc_registry.add() in the case that "subclass" is already in
cls._abc_registry. It looks like the code should be preceded with
something like:

        if subclass in cls._abc_registry:
            return True

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to