You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ConfigParser to accept a custom dict to allow ordering #42649
ConfigParser.diff: Unified diff of ConfigParser from Python lib 2.4.1
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2006-12-03.12:02:52.000>created_at=<Date2005-12-01.17:39:53.000>labels= ['library']
title='ConfigParser to accept a custom dict to allow ordering'updated_at=<Date2006-12-03.12:02:52.000>user='https://bugs.python.org/mdelliot'
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.
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
accepted.
Activity
mdelliot commentedon Dec 1, 2005
In many cases it is preferrable for ConfigParser to
maintain the order
in which its items were added. This small change adds
a
customdictdefault argument to *ConfigParser's constructor to
allow users to
specify a custom dict.
A useful example is::
One such
my_ordered_dictcould be the ordereddictionary "odict"
http://www.voidspace.org.uk/python/odict.html.
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
accepted.
loewis commentedon Dec 3, 2006
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.