(self, value, case)
Convert case.
Convert case.
Convert case .
def convert_case(self, value, case):
        """Convert case."""

        if self.binary:
            cased = []
            for c in value:
                if c in _ASCII_LETTERS:
                    cased.append(c.lower() if case == _LOWER else c.upper())
                else:
                    cased.append(c)
            return "".join(cased)
        else:
            return value.lower() if case == _LOWER else value.upper()
def convert_case ( self , value , case ) : if self . binary : cased = [ ] for c in value : if c in _ASCII_LETTERS : cased . append ( c . lower ( ) if case == _LOWER else c . upper ( ) ) else : cased . append ( c ) return "" . join ( cased ) else : return value . lower ( ) if case == _LOWER else value . upper ( )