<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compile_excludes(self):
 """Compile a set of regexps for files to be exlcuded from scans."""

        self.compiled_exclude_files = []
        for pattern in self.exclude_files:
            try:
                self.compiled_exclude_files.append(re.compile(pattern))
            except re.error as e:
                raise ValueError(
                    "Bad python regex in exclude '%s': %s" % (pattern, str(e)))