On Tue, Mar 4, 2014 at 9:22 AM, Marko Rauhamaa <ma...@pacujo.net> wrote: > You generally use "==" if more than one object could be equal. If you > know there's only one object of the kind, you convey that knowledge by > the use of "is" even when functionally, it doesn't matter.
It's even simpler than that. You use "==" when you care about value, and "is" when you care about identity. This is because "==" tests value, and "is" tests identity. I do not understand why there is confusion. ChrisA -- https://mail.python.org/mailman/listinfo/python-list