Actually, since this function is called so so many times, even better to take the attribute lookup out of the function, too:

```python
    pat = compile('A{max_homopolymer+1} | T{max_homopolymer+1} | G{max_homopolymer+1} | C{max_homopolymer+1}')
    pat_search = pat.search
    def seq_exceeds_homopolymers(curr_seq):
        if pat_search(curr_seq):
            return True
        return False
```