X-Git-Url: http://gitweb.pimeys.fr/?p=bots%2Fparrot.git;a=blobdiff_plain;f=quotes.py;h=bd05913fe316a4bf980fd09adf07f58460788d50;hp=08cac11f11368a8dec06db4f2bce6cd1ae0d8e54;hb=b58870bba04ffabc1a7469e6fd80e4bc60ebc41c;hpb=ceb91bbbe344c41702edb1707a7d4b05ecca2e39 diff --git a/quotes.py b/quotes.py index 08cac11..bd05913 100644 --- a/quotes.py +++ b/quotes.py @@ -47,8 +47,8 @@ class Quote(object): def __eq__(self, otherquote): """ Vérifie si cette phrase n'a pas déjà été dite par la même personne. - Indépendamment de la date. """ - return [self.author, self.content] == [otherquote.author, otherquote.content] + Indépendamment de la date et de la casse. """ + return [self.author.lower(), self.content.lower()] == [otherquote.author.lower(), otherquote.content.lower()] def parse(text, date=None):