Wouldn't it be easiest to understand if it just used the hyphen in both places? The underscore is a programmers' character, not meant for end users!
It is very easy to "parse" config files if they are written in correct Python code. You just use the Python builtin program parser. Unfortunately Python does not allow a hyphen in a variable name.