def normalize_whitespace(self, value):
        """Normalizes whitespace; called if ``ignore_ws`` is true."""
        if isinstance(value, unicode):
            return u" ".join(
                x for x in re.split(r'\s+', value, flags=re.UNICODE) if
                len(x)
            )
        else:
            return " ".join(value.split())
def normalize_whitespace ( self , value ) : if isinstance ( value , unicode ) : return u" " . join ( x for x in re . split ( r'\s+' , value , flags = re . UNICODE ) if len ( x ) ) else : return " " . join ( value . split ( ) )
Normalizes whitespace; called if ``ignore_ws`` is true.