Drop Python 2 (4/n): SearchQuery.query is a str instead of bytes

This commit is contained in:
Dalf 2020-08-11 16:25:03 +02:00 committed by Alexandre Flament
parent 7888377743
commit c225db45c8
20 changed files with 48 additions and 48 deletions

View file

@ -27,15 +27,15 @@ def answer(query):
func = parts[0]
answer = None
if func == b'min':
if func == 'min':
answer = min(args)
elif func == b'max':
elif func == 'max':
answer = max(args)
elif func == b'avg':
elif func == 'avg':
answer = sum(args) / len(args)
elif func == b'sum':
elif func == 'sum':
answer = sum(args)
elif func == b'prod':
elif func == 'prod':
answer = reduce(mul, args, 1)
if answer is None: