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.

empty_string_comparison.py 282B

12345678910111213141516
  1. # pylint: disable=literal-comparison,missing-docstring
  2. X = ''
  3. Y = 'test'
  4. if X is '': # [compare-to-empty-string]
  5. pass
  6. if Y is not "": # [compare-to-empty-string]
  7. pass
  8. if X == "": # [compare-to-empty-string]
  9. pass
  10. if Y != '': # [compare-to-empty-string]
  11. pass