Replace is with == for literal or new object comparisons#17
Replace is with == for literal or new object comparisons#17pixeebot[bot] wants to merge 1 commit intomainfrom
is with == for literal or new object comparisons#17Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
|
I'm confident in this change, but I'm not a maintainer of this project. Do you see any reason not to merge it? If this change was not helpful, or you have suggestions for improvements, please let me know! |
|
Just a friendly ping to remind you about this change. If there are concerns about it, we'd love to hear about them! |
|
This change may not be a priority right now, so I'll close it. If there was something I could have done better, please let me know! You can also customize me to make sure I'm working with you in the way you want. |




The
isandis notoperators only evaluate toTruewhen the expressions on each side have the sameid. In other words,a is bis equivalent toid(a) == id(b). With few exceptions, objects and literals have unique identities and thus shouldn't generally be compared by using theisoris notoperators.Our changes look something like this:
More reading
🧚🤖 Powered by Pixeebot
Feedback | Community | Docs | Codemod ID: pixee:python/literal-or-new-object-identity