> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# python-fixed-regex-in-loop

> A Python loop repeatedly looks up a fixed pattern in the re.compile cache.

## What it flags

A Python loop repeatedly looks up a fixed pattern in the re.compile cache.

## Example

`re.compile("pattern")` with a string literal, in a module that imports `re`.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "python-fixed-regex-in-loop": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.