From 9e30cfbda67c29fc792de44bcd3adfbbfb51a245 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 12 Aug 2019 22:47:59 +0200 Subject: [PATCH] Use ==/!= to compare str, bytes, and int literals Identity is not the same thing as equality in Python. --- examples/inline_example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/inline_example.py b/examples/inline_example.py index e36932d..21f05eb 100644 --- a/examples/inline_example.py +++ b/examples/inline_example.py @@ -51,7 +51,7 @@ def query_video(inline_query): print(e) -@bot.inline_handler(lambda query: len(query.query) is 0) +@bot.inline_handler(lambda query: len(query.query) == 0) def default_query(inline_query): try: r = types.InlineQueryResultArticle('1', 'default', types.InputTextMessageContent('default'))