This works:
>>> not(True)
False
>>> a = {}
>>> a["hidden"] = False
>>> a["hidden"] = not(a["hidden"])
>>> a["hidden"]
True
but not this:
def toggleHelp(self, event):
# https://stackoverflow.com/questions/10267465/showing-and-hiding-widgets#10268076
if (self.special_frame["hidden"] == False):
self.special_frame.grid_remove()
else:
self.special_frame.grid()
self.special_frame["hidden"] == not(self.special_frame["hidden"])
error
line 563
self.special_frame["hidden"] == not(self.special_frame["hidden"])
^
SyntaxError: invalid syntax
in the init:
self.special_frame["hidden"] = False
What I am doing wrong ?