From 101aa73f132d5124d8da45bae11a29c423420072 Mon Sep 17 00:00:00 2001 From: tallero Date: Thu, 6 Sep 2018 20:32:19 +0200 Subject: [PATCH] "==" instead of "is" with "is" the condition does not get executed for me. Python 3.6.6. --- example/python/tdjson_example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/python/tdjson_example.py b/example/python/tdjson_example.py index f5e515c3..57e2013c 100644 --- a/example/python/tdjson_example.py +++ b/example/python/tdjson_example.py @@ -95,7 +95,7 @@ while True: event = td_receive() if event: # if client is closed, we need to destroy it and create new client - if event['@type'] is 'updateAuthorizationState' and event['authorization_state']['@type'] is 'authorizationStateClosed': + if event['@type'] == 'updateAuthorizationState' and event['authorization_state']['@type'] == 'authorizationStateClosed': break # handle an incoming update or an answer to a previously sent request