I think it's a perfect use-case for a set.
Changing it to `set(['DATABASES', 'CACHES'])` would be compatible with python2.6+ (which is what we support for now).