[issue6517] configparser: add possibility to escape formatstrings

R. David Murray report at bugs.python.org
Sun Jul 19 01:09:00 CEST 2009


R. David Murray <rdmurray at bitdance.com> added the comment:

Ah, that's because you aren't using SafeConfigParser (which the docs
recommend that you do unless you have to use ConfigParser for backward
compatibility reasons).  Your test case works with SafeConfigParser.

You are correct that it is not explicitly documented in the ConfigParser
docs.  It is implied by the fact that the magic substitution is
documented to be a standard format string, and by the recommendation to
use SafeConfigParser because ConfigParser's handling of formatstrings is
broken.

To make this all explicit, I've attached a doc patch to make the
motivation for using SafeConfigParser clearer, using this as the
example.  Let me know what you think.

Georg, Raymond, I added you as nosy to ask for a style/content opinion.
 Should we instead rewrite the section to put SafeConfigParser first,
and perhaps even deprecate ConfigParser?

----------
assignee:  -> r.david.murray
components: +Documentation -Library (Lib)
keywords: +patch
nosy: +georg.brandl, rhettinger
priority:  -> normal
resolution: works for me -> 
stage: committed/rejected -> patch review
versions: +Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14523/issue6517.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6517>
_______________________________________


More information about the Python-bugs-list mailing list