How to make boolean value inverse? How to make the Material.fsxm_nobasespec boolean has inverse result.

In default the value for True is 1 and False is 0. I want it to be the inverse. 

Example True = 0 and False = 1

import bpy
from bpy.types import Material
from bpy.props import IntProperty, BoolProperty, StringProperty, FloatProperty, EnumProperty, FloatVectorProperty

class FSXMaterial(bpy.types.Panel):
    """FSX Material properties Panel"""
    bl_label = "FSX/P3D Material Params"
    bl_idname = "FSXMATERIAL_PT_fsx_props"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "material"
    bl_options = {'DEFAULT_CLOSED'}

def draw_header(self,context):
    mat = context.active_object.active_material        
    layout = self.layout
    if mat:
        layout.prop(mat, "fsxm_isFSXmaterial", text = "")

def draw(self, context):
    mat = context.active_object.active_material
    layout = self.layout
    if mat:
        layout.label(text = "Enhanced Parameters")
        box = layout.box()
        box.prop(mat, 'fsxm_nobasespec')

def register():
    bpy.utils.register_module(__name__)

    Material.fsxm_nobasespec = BoolProperty(name = "Do Not Use Specular Map", default = False)

def unregister():
    bpy.utils.unregister_module(__name__)

    del Material.fsxm_nobasespec

if __name__ == "__main__":
register()
There are several ways how to convert a Boolean value to its 'reverse'

option 1: using not

not will reverse False into True and True into False.

spec = not mat.fsxm_nobasespec


option 2: using a translation dict

REVERSE_BOOLEAN_DICT = {
    True: 0,
    False: 1,
}
spec = RESERVER_BOOLEAN_DICT.get(mat.fsxm_nobasespec)


These options can be wrapped in a property for convenience.

@property
def reverse_basespec(self):
    return not self.fsxm_nobasespec
Material.fsxm_basespec = reverse_basespec


Looking at the code that is posted as comment below the best option is to:

Exporter.File.Write("BaseMaterialSpecular {\n") 
Exporter.File.Write(" %i; // Not Using Specular Map\n" %(not Material.fsxm_nobasespec)) 
Exporter.File.Write("}\n").


Please note that this is using python2 formatting conventions. Using python3 conventions it is best to use.

Exporter.File.Write("""BaseMaterialSpecular {{
 {fsxm_nobasespec:d}; // Not Using Specular Map
}}
""".format(fsxm_nobasespec=not Material.fsxm_nobasespec))