[issue4326] type of UserList instance returns class instead of instance

chafporte report at bugs.python.org
Sat Nov 15 00:54:53 CET 2008


chafporte <junk at ysengrin.com> added the comment:

but for a user define class we have:
>class AAA:
>...  pass
>
>a = AAA()
>type(a)
<type 'instance'>
and you can compare this with types.InstanceType
and it says True

where for the UserList instance the comparison with 
types.InstanceType says False

it is just not homogenous. and it make the comparison with
types.InstanceType unusable !!!

are you sure this is not breaking the API ?

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4326>
_______________________________________


More information about the Python-bugs-list mailing list