Message8023
isinstance() and issubclass() fail with abc.ABCMeta in Jython. They work in CPython.
$ cat abc_test.py
import abc
class A(abc.ABCMeta): pass
print(isinstance(0, abc.ABCMeta))
print(issubclass(A, abc.ABCMeta))
print(issubclass(abc.ABCMeta, abc.ABCMeta))
$ python2.7 abc_test.py
False
True
True
$ jython2.7 abc_test.py
Traceback (most recent call last):
File "abc_test.py", line 3, in <module>
print(isinstance(0, abc.ABCMeta))
RuntimeError: maximum recursion depth exceeded in __instancecheck__ |
|
Date |
User |
Action |
Args |
2013-05-20 09:52:20 | Arfrever | set | recipients:
+ Arfrever |
2013-05-20 09:52:20 | Arfrever | set | messageid: <1369043540.89.0.143138840899.issue2055@psf.upfronthosting.co.za> |
2013-05-20 09:52:20 | Arfrever | link | issue2055 messages |
2013-05-20 09:52:20 | Arfrever | create | |
|