def __str__(self):
        """Pretty printed error string.

        Returns:
            str: Human readable error string
        """
        if self.function:
            return 'More than one location is required for %s.' % self.function
        elif self.data:
            return 'Location parsing failure in location %i %r.' % self.data
        else:
            return 'Invalid location data.'
def __str__ ( self ) : if self . function : return 'More than one location is required for %s.' % self . function elif self . data : return 'Location parsing failure in location %i %r.' % self . data else : return 'Invalid location data.'
Pretty printed error string.

        Returns:
            str: Human readable error string