Message122736
>>> 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. |
|
Date |
User |
Action |
Args |
2010-11-28 21:47:59 | cool-RR | set | recipients:
+ cool-RR |
2010-11-28 21:47:59 | cool-RR | set | messageid: <1290980879.69.0.728578959606.issue10569@psf.upfronthosting.co.za> |
2010-11-28 21:47:58 | cool-RR | link | issue10569 messages |
2010-11-28 21:47:58 | cool-RR | create | |
|