Exemplo n.º 1
0
    def getString(self, objects, fitString='squeeze'):
        """
        Returns a string based on the format string set in __init__
        and uses the objects defined in the list 'objects' as the input.
        The order of the objects does not matter, and you also need not
        pass in an object that won't be used.  For example, if your
        format string doesn't require any variables from the Slot object,
        then one need not be passed.

        """

        # get rid of the old values
        self.objects.clear()
        
        for obj in objects:
            self.objects[obj.__class__.__name__] = obj

        # since we have overloaded _getValue we need not pass a valid
        # object.
        return Formatter.getString(self, None, fitString=fitString)