3 ms·
One variant of this is to use Python syntax but parse it with the `ast` module rather than evaluating it. This avoids the security problems and the risk that s
by mjw1007 7y ago
One variant of this is to use Python syntax but parse it with the `ast` module rather than evaluating it.
This avoids the security problems and the risk that someone will start to write programs inside the configuration file, but gives you the reasonably nice and powerful syntax.
It turns out that teenagers in my country have often done some Python in school, so it's becoming one of the friendlier file formats for non-programmers.
- karlicoss 7y ago(author here). The ast suggestion sounds cool, never came to my mind. Thanks, I'll try it sometime!