1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Use ==/!= to compare str, bytes, and int literals

Identity is not the same thing as equality in Python.
This commit is contained in:
Christian Clauss 2019-08-12 22:47:59 +02:00 committed by GitHub
parent 151880f391
commit 9e30cfbda6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'))