[issue2521] ABC caches should use weak refs

Jack Diederich report at bugs.python.org
Thu Aug 5 17:51:11 CEST 2010


Jack Diederich <jackdied at gmail.com> added the comment:

This is a change in the codepath for instances that don't have __class__ defined.
         subclass = getattr(instance, '__class__', None)
-        if subclass in cls._abc_cache:
+        if subclass is not None and subclass in cls._abc_cache:

I think the same thing happens in either case (from visual inspection of the code) but I'd rather not change it if we don't need to.

----------
nosy: +jackdied

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2521>
_______________________________________


More information about the Python-bugs-list mailing list