New submission from Ram Rachum <cool...@cool-rr.com>: >>> import abc >>> class A(object, metaclass=abc.ABCMeta): ... pass >>> issubclass([], A) Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> issubclass([], A) File "c:\Python32\lib\abc.py", line 137, in __subclasscheck__ if subclass in cls._abc_cache: File "c:\Python32\lib\_weakrefset.py", line 69, in __contains__ return ref(item) in self.data TypeError: cannot create weak reference to 'list' object
I should be able to check whether an object is a subclass of something without confirming it's a type first. I think this call should just return False. ---------- components: Library (Lib) messages: 122736 nosy: cool-RR priority: normal severity: normal status: open title: abc: `issubclass([], my_abstract_type)` raises exception type: behavior versions: Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10569> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com