Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-15153

Use Python `is` instead of `==` to compare for None

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.6.0
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              isding_l Lan Ding
              divijvaidya Divij Vaidya
              Divij Vaidya Divij Vaidya
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: