This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: ConfigParser to accept a custom dict to allow ordering
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: loewis, mdelliot
Priority: normal Keywords: patch

Created on 2005-12-01 17:39 by mdelliot, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
ConfigParser.diff mdelliot, 2005-12-01 17:39 Unified diff of ConfigParser from Python lib 2.4.1
Messages (2)
msg49158 - (view) Author: Micah Elliott (mdelliot) Date: 2005-12-01 17:39
In many cases it is preferrable for ConfigParser to
maintain the order
in which its items were added.  This small change adds
a `customdict`
default argument to *ConfigParser's constructor to
allow users to
specify a custom dict.

A useful example is::

    from ConfigParser import ConfigParser

One such `my_ordered_dict` could be the ordered
dictionary "odict"

Ordered dictionaries have been a recent popular topic on
comp.lang.python, and there are a few possibilities for
implementation, so it seems best that ConfigParser just
offer a
default argument to support such customization.

I can submit a documentation patch if this idea is
msg49159 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-12-03 12:02
Thanks for the patch; I committed it with some modifications (e.g. renaming of the parameter to dict_type). Committed as r52908.

Please include patches to the documentation and the test suite in the future.
Date User Action Args
2022-04-11 14:56:14adminsetgithub: 42649
2005-12-01 17:39:53mdelliotcreate