Commit 68fe37fd authored by Vitor Lopes's avatar Vitor Lopes

add some comments on how to use operators correctly

parent 5b133dd7
......@@ -947,7 +947,10 @@ class MyWindow(Gtk.Window):
state = "on"
state = "off"
if state is 'on':
# == operator compares the values of both the operands and checks for value equality.
# is operator checks whether both the operands refer to the same object or not.
# in this use case == is the right choice.
if state == 'on':
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment