Gregory Ewing writes: > My problem is that I find it difficult to remember that Python > considers 'in' to be a comparison operator. > > To me, comparison is something you do between things of the same kind, > whereas 'in' is a relationship between things of different > kinds. Calling it a comparison is like comparing apples and > oranges. Or apples and baskets of apples, or something.
Ordinary binary operators not only combine things of the same type, they also produce a thing of that same type. So 'in' does not fit among them either. I feel it's _more_ at home among comparison operators. (Hm. That's 'operator' in a different sense.) -- https://mail.python.org/mailman/listinfo/python-list