I'm not a huge fan of the `\` maybe try something like:
```python
request.MOBILE = ((mc != 'off' and self.USER_AGENTS.search(ua)) or 
                  mc == 'on')
```