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

2008-11-17 Thread chafporte
chafporte <[EMAIL PROTECTED]> 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 y

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

2008-11-14 Thread chafporte
chafporte <[EMAIL PROTECTED]> added the comment: but for a user define class we have: >class AAA: >... pass > >a = AAA() >type(a) and you can compare this with types.InstanceType and it says True where for the UserList instance the comparison with types.InstanceType s

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

2008-11-14 Thread chafporte
chafporte <[EMAIL PROTECTED]> added the comment: but like that there is no way to detect if the object is a class or an instance. type() says it's a class in both case ! ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

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

2008-11-14 Thread chafporte
New submission from chafporte <[EMAIL PROTECTED]>: from UserList import UserList lu = UserList() type(lu) python2.6 prints: python2.5 prints: -- components: None messages: 75885 nosy: chafporte severity: normal status: open title: type of UserList instance returns class inst