How to easily toggle a Boolean property?
This can trivially be done as:

obj.show_name = not obj.show_name


Which basically says: if True, make it not True (i.e. False), else if False, make it not False (i.e. True).