[Python-Dev] Extension to ConfigParser (original) (raw)
Michael Foord fuzzyman at voidspace.org.uk
Tue Jan 31 13:38:19 CET 2006
- Previous message: [Python-Dev] Extension to ConfigParser
- Next message: [Python-Dev] Extension to ConfigParser
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Tony Meyer wrote:
[Guido van Rossum]
What would break if we rewrote the save functionality to produce a predictable order?
As a reminder to anyone interested, there are three patches on SF that provide this (each in a different way): ConfigParser to accept a custom dict to allow ordering http://python.org/sf/1371075 Adds an optional argument to the constructor, the value of which will be the class used to store the configuration data (so that a third- party order-preserving dictionary class can be used). ConfigParser to save with order http://python.org/sf/1399309 Does a sort() of the sections and options before writing them. These first two patches don't seem to address the main issue, which is preserving the original order of the file.
Add 'surgical editing' to ConfigParser http://python.org/sf/1410680 Adds an updatefile method (no other changes) that updates the given file to match the current configuration, preserving blank lines, comments, and order. [Disclaimer: this is my patch]
This one however does, and if it does what it says on the box - is definitely worth accepting.
All the best,
Michael Foord http://www.voidspace.org.uk/python/index.shtml
=Tony.Meyer
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/fuzzyman%40voidspace.org.uk
- Previous message: [Python-Dev] Extension to ConfigParser
- Next message: [Python-Dev] Extension to ConfigParser
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]