summaryrefslogtreecommitdiffstats
path: root/Lib/configparser.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-03-02 23:06:00 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-03-02 23:06:00 (GMT)
commit0663a1ed793c164fb11d3dd62bebc677e260891e (patch)
tree1f56f1dcc13dc07301c7d0c32d2d04d49b6f1afb /Lib/configparser.py
parent6accb988a1822dc2927346ae4819aff8cc876b98 (diff)
downloadcpython-0663a1ed793c164fb11d3dd62bebc677e260891e.zip
cpython-0663a1ed793c164fb11d3dd62bebc677e260891e.tar.gz
cpython-0663a1ed793c164fb11d3dd62bebc677e260891e.tar.bz2
Let configparser use ordered dicts by default.
Diffstat (limited to 'Lib/configparser.py')
-rw-r--r--Lib/configparser.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/configparser.py b/Lib/configparser.py
index 5e36cc9..f2e644c 100644
--- a/Lib/configparser.py
+++ b/Lib/configparser.py
@@ -88,6 +88,7 @@ ConfigParser -- responsible for parsing a list of
"""
import re
+from collections import OrderedDict
__all__ = ["NoSectionError", "DuplicateSectionError", "NoOptionError",
"InterpolationError", "InterpolationDepthError",
@@ -215,7 +216,7 @@ class MissingSectionHeaderError(ParsingError):
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()