mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Let configparser use ordered dicts by default.
This commit is contained in:
parent
6accb988a1
commit
0663a1ed79
3 changed files with 13 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue