Détermination du bord politique de mots divers http://clivage.foxgl.ovh
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.
 
 
 
 

16 lines
395 B

  1. class Locale:
  2. left = ['left', 'gauche', 'goche']
  3. right = ['right', 'droite', 'drouate']
  4. @classmethod
  5. def check(cls, dic: list, word: str):
  6. return any(word in string for string in dic)
  7. @classmethod
  8. def is_left(cls, word: str):
  9. return cls.check(cls.left, word)
  10. @classmethod
  11. def is_right(cls, word: str):
  12. return cls.check(cls.right, word)