#python #datamodel #programming #comparison
-
is
compare the reference or theid
of the object, otherwise==
compare the values. -
is
is faster than==
because it does not implement__eq__
in python -
is
usually is used to compare to Singleton objects likeNone
x is None
References
- Ramalho, 2022, p201-208