[issue9452] configparser support for reading from strings and dictionaries

Łukasz Langa report at bugs.python.org
Tue Aug 3 16:47:59 CEST 2010


Łukasz Langa <lukasz at langa.pl> added the comment:

FTR, some people questioned the purpose of read_dict(). Let me summarize this very briefly here:

- the API is using dictionaries similar to those in defaults= but has one level of depth more (sections)
- initializing a parser with a dictionary produces syntax that is more natural in code
- having a single method implementing reading a dictionary with unit tests, support for proper duplicate handling, etc. frees users from writing their own
- we need that anyway for upcoming mapping protocol access discussed in #5412
- more detailed use cases in msg112429

----------

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


More information about the Python-bugs-list mailing list