options within a section, and for the default values. This class does not
support the magical interpolation behavior.
+ .. versionchanged 3.1
+ The default *dict_type* is :class:`collections.OrderedDict`.
+
.. class:: ConfigParser([defaults[, dict_type]])
option names to lower case), the values ``foo %(bar)s`` and ``foo %(BAR)s`` are
equivalent.
+ .. versionchanged 3.1
+ The default *dict_type* is :class:`collections.OrderedDict`.
+
.. class:: SafeConfigParser([defaults[, dict_type]])
.. XXX Need to explain what's safer/more predictable about it.
+ .. versionchanged 3.1
+ The default *dict_type* is :class:`collections.OrderedDict`.
+
.. exception:: NoSectionError
"""
import re
+from collections import OrderedDict
__all__ = ["NoSectionError", "DuplicateSectionError", "NoOptionError",
"InterpolationError", "InterpolationDepthError",
class RawConfigParser:
- def __init__(self, defaults=None, dict_type=dict):
+ def __init__(self, defaults=None, dict_type=OrderedDict):
self._dict = dict_type
self._sections = self._dict()
self._defaults = self._dict()
- The _asdict() for method for namedtuples now returns an OrderedDict().
+- configparser now defaults to using an ordered dictionary.
+
- Issue #1733986: Fixed mmap crash in accessing elements of second map object
with same tagname but larger size than first map. (Windows)