[Python-3000-checkins] r66147 - in python/branches/py3k: Lib/abc.py

nick.coghlan python-3000-checkins at python.org
Tue Sep 2 12:43:28 CEST 2008


Author: nick.coghlan
Date: Tue Sep  2 12:43:28 2008
New Revision: 66147

Log:
Merged revisions 66144 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r66144 | nick.coghlan | 2008-09-02 20:14:47 +1000 (Tue, 02 Sep 2008) | 1 line
  
  Issue 3747: Fix caching in ABCMeta.__subclasscheck__ (R: Georg Brandl)
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Lib/abc.py

Modified: python/branches/py3k/Lib/abc.py
==============================================================================
--- python/branches/py3k/Lib/abc.py	(original)
+++ python/branches/py3k/Lib/abc.py	Tue Sep  2 12:43:28 2008
@@ -159,12 +159,12 @@
         # 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)
+                cls._abc_cache.add(subclass)
                 return True
         # Check if it's a subclass of a subclass (recursive)
         for scls in cls.__subclasses__():
             if issubclass(subclass, scls):
-                cls._abc_registry.add(subclass)
+                cls._abc_cache.add(subclass)
                 return True
         # No dice; update negative cache
         cls._abc_negative_cache.add(subclass)


More information about the Python-3000-checkins mailing list