On Sat, Jan 31, 2009 at 2:47 PM, spir <denis.s...@free.fr> wrote:

>> > o.__class__ (or rather o.__class__.__name__) will work.
>> Understood. Thank you.
>> tj
>
> type(a) has been changed (since 2.2?) to return the same value as a.__class__

I think you mean type(o) (type of the instance) rather than type(a)
(type of the class object).
type(o) == o.__class__ is only true if o is an instance of a new-style
class. Instances of oldstyle classes all have type 'instance'.

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to