def bool_to_int(value):
 if (value is True):
  return '1'
 elif (value is False):
  return '0'
 else:
  return value

def bool_to_int ( value ) : if ( value is True ) : return '1' elif ( value is False ) : return '0' else : return value
translates python booleans to rpc-safe integers .