You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Lan Ding (Jira)" <ji...@apache.org> on 2023/07/06 10:41:00 UTC
[jira] [Commented] (KAFKA-15153) Use Python `is` instead of `==` to compare for None
[ https://issues.apache.org/jira/browse/KAFKA-15153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17740544#comment-17740544 ]
Lan Ding commented on KAFKA-15153:
----------------------------------
Hi, can I be assigned to it?
> Use Python `is` instead of `==` to compare for None
> ----------------------------------------------------
>
> Key: KAFKA-15153
> URL: https://issues.apache.org/jira/browse/KAFKA-15153
> Project: Kafka
> Issue Type: Improvement
> Reporter: Divij Vaidya
> Priority: Minor
> Labels: newbie
>
> *This is a good item to be picked by first time contributors to Kafka code base*
> At release_notes.py Line: 47
> The {{==}} and {{!=}} operators use the compared objects' {{__eq__}} method to test if they are equal. To check if an object is a singleton, such as {{{}None{}}}, we recommend that you use the {{is}} identity comparison operator.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)