Terry J. Reedy added the comment:

The MS function GetPrivateProfileString appears to require sections.
http://msdn.microsoft.com/en-us/library/ms724353.aspx
On the other hand, it does not appear to do interpolation, so we have already 
not restricted ourselves to the MS function.

In looking through the .ini files in my game directory, which includes some old 
games, I found a couple with no section header.  So such files do exist in the 
wild.  I am dubious that there are any with a mixture of both sections and 
additional option lines at the top without a section.

Anyone writing an app and planning to parse a .ini file can add [Start] or 
[Setup] at the top.  So there is only an issue for 3rd party software parsing a 
file without.

I think a more useful new configparser feature would be to keep comment lines 
and write them back out after a configuration is changed.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22253>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to