Project

General

Profile

Bug #3025

Fix the code to correctly do comparison with None

Added by Parag Mhashilkar about 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Parag Mhashilkar
Category:
-
Target version:
Start date:
11/15/2012
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
First Occurred:
Occurs In:
Stakeholders:
Duration:

Description

We should not use '==' and '!=' when comparing with None. Change to 'is' or 'is not'

# WRONG way of comparing
if foo == None:
   do_something()

if bar != None:
   do_something_else()
# CORRECT way of comparing
if foo is None:
   do_something()

if bar is not None:
   do_something_else()

Subtasks

Bug #3127: Master: Handle comparison with None correctlyClosedParag Mhashilkar

History

#1 Updated by Parag Mhashilkar about 8 years ago

  • Status changed from Assigned to Feedback
  • Assignee changed from Parag Mhashilkar to Douglas Strain

Changes in branch_v2plus_3025

#2 Updated by Douglas Strain about 8 years ago

  • Assignee changed from Douglas Strain to Parag Mhashilkar

Wow, that is a lot of "None"s. I went through them all and did not see any typos. Feel free to merge.

#3 Updated by Parag Mhashilkar about 8 years ago

  • Status changed from Feedback to Resolved
  • Target version changed from v2_7_x to 293

#4 Updated by Parag Mhashilkar over 7 years ago

  • Target version changed from 293 to v2_7

#5 Updated by Parag Mhashilkar over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF