def _add_from_str(self, s):
        """Add locations from a string"""

        if sys.version_info[0] < 3 and isinstance(s, str):
            s = s.decode('utf-8')

        for line in s.split("\n"):
            self._parse_line(line)
def _add_from_str ( self , s ) : if sys . version_info [ 0 ] < 3 and isinstance ( s , str ) : s = s . decode ( 'utf-8' ) for line in s . split ( "\n" ) : self . _parse_line ( line )
Add locations from a string