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
1 changed files with 1 additions and 1 deletions

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