Proposal: === and !=== operators
Chris Angelico
rosuav at gmail.com
Wed Jul 9 05:23:48 EDT 2014
On Wed, Jul 9, 2014 at 7:02 PM, Steven D'Aprano <steve at pearwood.info> 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.
ChrisA
More information about the Python-list
mailing list