[issue38666] is for tuples

Benjamin Peterson report at bugs.python.org
Sat Nov 2 10:05:58 EDT 2019


Benjamin Peterson <benjamin at python.org> added the comment:

"is" compares by identity not equality. Since tuples are immutable, the interpreter is free to reuse or not reuse the same tuple instance when it appears multiple times in a program. This is an implementation detail not a bug.

----------
nosy: +benjamin.peterson
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38666>
_______________________________________


More information about the Python-bugs-list mailing list