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.

duplicate_dict_literal_key.py 316B

1234567891011121314151617
  1. """Check multiple key definition"""
  2. # pylint: disable=C0103,pointless-statement
  3. correct_dict = {
  4. 'tea': 'for two',
  5. 'two': 'for tea',
  6. }
  7. wrong_dict = { # [duplicate-key]
  8. 'tea': 'for two',
  9. 'two': 'for tea',
  10. 'tea': 'time',
  11. }
  12. {1: b'a', 1: u'a'} # [duplicate-key]
  13. {1: 1, 1.0: 2} # [duplicate-key]