(self, value)
return conv
Given value is expected to be a binary - 0/1
Given value is expected to be a binary - 0/1
Given value is expected to be a binary - 0 / 1
def _trans_binary(self, value):
        """ Given value is expected to be a binary - 0/1 """
        try:
            conv = int(value)
        except ValueError:
            return 0

        if conv not in [0, 1]:
            return 0

        return conv
def _trans_binary ( self , value ) : try : conv = int ( value ) except ValueError : return 0 if conv not in [ 0 , 1 ] : return 0 return conv