Search code examples
pythonconfigparser

Python, ConfigParser: What is 'magical interpolation'


The documentation for ConfigParser in Python talks a lot about the so-called "magical interpolation" feature, but never explains what it actually does. I've tried searching for it, but haven't found any answers.


Solution

  • bad_subj below would be parsed into 'Notify [failure]'

    bad_subj: %(subj)s [failure]
    subj: Notify