Proposal: === and !=== operators

Chris Angelico rosuav at
Wed Jul 9 11:23:48 CEST 2014

On Wed, Jul 9, 2014 at 7:02 PM, Steven D'Aprano <steve at> wrote:
> If you can tell the difference between x=y and x==y you should be able to
> also distinguish x===y. But I accept that it's a little sub-optimal.

I'm not bothered so much by the "which one is this" confusion as the
"which should this be" confusion. With = and ==, it's easy: = for
assignment, == for comparison. But == and === would both be comparison
operators, and almost never would return different values. People
would use the wrong one frequently, and not know why.


More information about the Python-list mailing list