def __len__(self):
        '''Return roughly the number of characters in this string (half the byte length)'''
        if self.encoding == 'ascii':
            return len(self.encodedValue)
        else:
            return len(self.encodedValue)//2
def __len__ ( self ) : if self . encoding == 'ascii' : return len ( self . encodedValue ) else : return len ( self . encodedValue ) // 2
Return roughly the number of characters in this string (half the byte length)