def _erase_in_line(self, type_of=0):
        """
        Erases the row in a specific way, depending on the type_of.
        """

        row = self.display[self.y]
        attrs = self.attributes[self.y]
        if type_of == 0:
            # Erase from the cursor to the end of line, including the cursor
            row = row[:self.x] + u" " * (self.size[1] - self.x)
            attrs = attrs[:self.x] + [self.default_attributes] * (self.size[1] - self.x)
        elif type_of == 1:
            # Erase from the beginning of the line to the cursor, including it
            row = u" " * (self.x+1) + row[self.x+1:]
            attrs = [self.default_attributes] * (self.x+1) + attrs[self.x+1:]
        elif type_of == 2:
            # Erase the entire line.
            row = u" " * self.size[1]
            attrs = [self.default_attributes] * self.size[1]

        self.display[self.y] = row
        self.attributes[self.y] = attrs
Erases the row in a specific way, depending on the type_of.