Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

singleton_comparison.py 367B

1234567891011
  1. # pylint: disable=missing-docstring, invalid-name, misplaced-comparison-constant,literal-comparison
  2. x = 42
  3. a = x is None
  4. b = x == None # [singleton-comparison]
  5. c = x == True # [singleton-comparison]
  6. d = x == False # [singleton-comparison]
  7. e = True == True # [singleton-comparison]
  8. f = x is 1
  9. g = 123 is "123"
  10. h = None is x
  11. i = None == x # [singleton-comparison]