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

chafporte report at bugs.python.org
Mon Nov 17 20:36:50 CET 2008


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

but in python 2.5 you may do this:

if type(lInstance) == types.InstanceType:
    ...
else:
    ...

and I don't see an easy way to do this with python 2.6
(feel free to propose a solution if you have one)

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


More information about the Python-bugs-list mailing list