This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cool-RR
Recipients cool-RR
Date 2010-11-28.21:47:58
SpamBayes Score 1.0711765e-11
Marked as misclassified No
Message-id <1290980879.69.0.728578959606.issue10569@psf.upfronthosting.co.za>
In-reply-to
Content
>>> 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.
History
Date User Action Args
2010-11-28 21:47:59cool-RRsetrecipients: + cool-RR
2010-11-28 21:47:59cool-RRsetmessageid: <1290980879.69.0.728578959606.issue10569@psf.upfronthosting.co.za>
2010-11-28 21:47:58cool-RRlinkissue10569 messages
2010-11-28 21:47:58cool-RRcreate