Roy Smith wrote: > In article <[EMAIL PROTECTED]>, > Joel Hedlund <[EMAIL PROTECTED]> wrote: >>Which means that "is" comparisons in general will be faster than == >>comparisons. > > I thought that == automatically compared identify before trying to compare > the values. Or am I thinking of some special case, like strings?
You must be thinking of a special case: >>> class A: ... def __cmp__(self, other): return 1 ... >>> a = A() >>> a is a True >>> a == a False -Peter -- http://mail.python.org/mailman/listinfo/python-list