(self, value)
Return a constant of type STRING.
Return a constant of type STRING.
Return a constant of type STRING .
def String(self, value):
        """Return a constant of type STRING."""
        if value in self.string_constants:
            return self.string_constants[value]

        if is_python_string(value):
            n = self.create_node(node_type=op.STR_CONSTANT,
                                 args=tuple(),
                                 payload=value)
            self.string_constants[value] = n
            return n
        else:
            raise TypeError("Invalid type in constant. The type was:" + \
                            str(type(value)))
def String ( self , value ) : if value in self . string_constants : return self . string_constants [ value ] if is_python_string ( value ) : n = self . create_node ( node_type = op . STR_CONSTANT , args = tuple ( ) , payload = value ) self . string_constants [ value ] = n return n else : raise TypeError ( "Invalid type in constant. The type was:" + str ( type ( value ) ) )