[Python-Dev] ConfigParser to save with order (original) (raw)
Guido van Rossum guido at python.org
Sun Jan 8 02:10:16 CET 2006
- Previous message: [Python-Dev] ConfigParser to save with order
- Next message: [Python-Dev] ConfigParser to save with order
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I think it's moot unless you also preserve comments. Ideally would be something that prserved everything (ordering, blank lines, comments etc.) from how it was read in. Modifying a value should keep its position. Adding a value should add it to the end of the section it's in (unless there are cases where ordering is important to the semantics -- are there?).
--Guido
On 1/7/06, Facundo Batista <facundobatista at gmail.com> wrote:
ConfigParser saves the data in a not-predefined order. This is because it keeps, internally, the information in dictionaries.
I opened a patch in SF 1399309 that orders the info to be saved in the file through the ConfigParser write() method. This patch does not let the user to specify the order, but allows to predict the order in which it'll be saved. There's another patch, the 1371075, that allows to specify the order through an "ordered dict". What do we want ConfigParser to do? Regards, . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] ConfigParser to save with order
- Next message: [Python-Dev] ConfigParser to save with order
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]