def set_response(self, response):
        """Set response.

        The response must either be None or implement the same interface as
        objects returned by mechanize.urlopen().

        """
        self._response = response
        self._forms_genf = self._links_genf = None
        self._get_title = None
        for name in self.LAZY_ATTRS:
            try:
                delattr(self, name)
            except __HOLE__:
                pass
dataset/ETHPy150Open Masood-M/yalih/mechanize/_html.py/Factory.set_response