summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2008-09-02 10:14:47 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2008-09-02 10:14:47 (GMT)
commit91ae3ea2b46a6e61a2112ffc0d53941a39e121ff (patch)
tree61dfb98b53be484813763e4fad4c6071a0390a80 /Lib
parent0792cbf5e166c18bdd98f1c9de1aea365dc13b55 (diff)
downloadcpython-91ae3ea2b46a6e61a2112ffc0d53941a39e121ff.zip
cpython-91ae3ea2b46a6e61a2112ffc0d53941a39e121ff.tar.gz
cpython-91ae3ea2b46a6e61a2112ffc0d53941a39e121ff.tar.bz2
Issue 3747: Fix caching in ABCMeta.__subclasscheck__ (R: Georg Brandl)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/abc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/abc.py b/Lib/abc.py
index 5e90bf5..618a32c 100644
--- a/Lib/abc.py
+++ b/Lib/abc.py
@@ -159,12 +159,12 @@ class ABCMeta(type):
# 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)