[Python-Dev] ConfigParser patches
goodger at python.org
Sat Oct 2 00:27:59 CEST 2004
> Instead of an explicit type check, it may be better to wrap the
> interpolation step in a try/except.
Problem with this approach: the interpolation is done at .get() time,
so any exception raised would be far from the culprit, .set().
> Ideally, the docs should discourage further non-string uses
My doc patch makes clear that non-string uses don't work with
interpolation & file output.
> and advise that ConfigParser will be string only for Py3.0.
Are there any other Python 3.0 advisories in the docs now? Seeing as
how there's no definite schedule or plan for Python 3.0, indeed it's
"a hypothetical future release" (PEP 3000), that may not be a
precedent we want to set.
In any case, I don't know that ConfigParser *should* be declared
string-only at all. Docutils uses it only to read config files; the
non-string values come from interpreting those values. It's quite
convenient to plug the interpreted values back into the ConfigParser
dicts and use those.
David Goodger <http://python.net/~goodger>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 253 bytes
Desc: OpenPGP digital signature
Url : http://mail.python.org/pipermail/python-dev/attachments/20041001/cc8fc5fc/signature.pgp
More information about the Python-Dev