Why shouldn't you put config options in py files

HT ht at example.com
Thu Dec 4 20:35:43 CET 2008

A colleague of mine is arguing that since it is easy to write config like:

FOO = {'bar': ('a': 'b'), 'abc': ('z': 'x')}

in config.py and just import it to get FOO, but difficult to achieve the
same using an ini file and ConfigParser, and since Python files are just
text, we should just write the config options in the Python file and
import it.

I can think of lots of arguments why this is a bad idea, but I don't
seem to be able to think of a really convincing one.


More information about the Python-list mailing list