Identity operators ``++is++`` and ``++is not++`` check if the same object is on both sides, i.e. ``++a is b++`` returns ``++True++`` if ``++id(a) == id(b)++``.
When a new object is created, it will have its own identity. Thus, if an object is created and used only in an identity check, it is not possible for the other operand to be the same object. The comparison is always ``++False++`` or always ``++True++`` depending on the operator used, ``++is++`` or ``++is not++``.
Whenever using a newly created object in a comparison, the identity operator should be replaced with the equality operator (`==` or `!=`), which will use ``++__eq__++`` or ``++__ne__++`` methods under the hood.
* https://adamj.eu/tech/2020/01/21/why-does-python-3-8-syntaxwarning-for-is-literal/[Why does Python 3.8 log a SyntaxWarning for 'is' with literals?] - Adam Johnson
* https://treyhunner.com/2019/03/unique-and-sentinel-values-in-python/#Equality_vs_identity[Equality vs identity] - Trey Hunner