Generally it's not a good thing to do assertions like this. The reason is that if this is in a Python environment with optimizations turned on, the assertions are all removed and thus this line won't execute. You're really doing data validation here, not code correctness validation which is what assert is really for.

`AAQ_LANGUAGES` is a tuple. If you want to keep the form where a validation error kicks up an exception, then you could use an existence check:

```
settings.AAQ_LANGUAGES.index(locale)
```

That'll kick up a `ValueError`:

```
Python 2.7.5 (default, Nov 12 2013, 16:18:42) 
[GCC 4.8.2 20131017 (Red Hat 4.8.2-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> foo = ('a', 'b', 'c')
>>> foo.index('d')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: tuple.index(x): x not in tuple
>>> foo.index('a')
0
```