Issue 2319: abc.py:ABCMeta.__instancecheck__ broken for old style classes
Created on 2008-03-17 10:49 by schmir, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg63630 - (view) | Author: Ralf Schmitt (schmir) | Date: 2008-03-17 10:49 | |
The following short program raises an exception:
import UserList
class C:
pass
print isinstance(C, UserList.UserList)
---------
exception:
Traceback (most recent call last):
File "t.py", line 6, in <module>
print isinstance(C, UserList.UserList)
File "/home/ralf/py26/lib/python2.6/abc.py", line 120, in
__instancecheck__
subclass = instance.__class__
AttributeError: class C has no attribute '__class__'
If I use a new style class it works.
|
|||
| msg63631 - (view) | Author: Ralf Schmitt (schmir) | Date: 2008-03-17 10:55 | |
I used svn revision 61433. |
|||
| msg63670 - (view) | Author: Jeffrey Yasskin (jyasskin) * ![]() |
Date: 2008-03-17 16:38 | |
Missed this. It's now fixed by r61438. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:31 | admin | set | github: 46572 |
| 2008-03-17 16:38:16 | jyasskin | set | status: open -> closed type: crash -> behavior messages: + msg63670 nosy: + jyasskin |
| 2008-03-17 10:55:20 | schmir | set | messages: + msg63631 |
| 2008-03-17 10:49:26 | schmir | create | |
