Andrew McNamara wrote: > 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
Actually, it looks to me like the subclass is getting added to the wrong set - it should be going into the _abc_cache, not the _abc_registry. Tracker item with the 2-line patch here if someone would care to give it the necessary post-beta review: http://bugs.python.org/issue3747 Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org _______________________________________________ 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