== operator in Python already works much like the
>>> 1 == 1 False >>> 1 == 1.0 True >>> 1 == True True
=== operators. The way Python uses
==, without a
This last bit about
bool might be a bit surprising, but
bool is a subclass of
int in Python.
Closest would maybe be the
is operator. It returns
True only if both variables point to the same object.