Paul Moore added the comment:

It's not unreasonable as a new feature, but the default behaviour shouldn't 
change. It matches ini files (like it or not, ConfigParser parses ini-style 
files - the docs even say so), and sectionless values are not standard ini 
format.

I'd suggest a new __init__ option, allow_unnamed_section (default False) that 
permits variables to be placed before the first section header. I'd further 
suggest that the names be treated as if they were in a section with name '', 
for consistency of access with other sections.

It's plausible that people might want the defaults section to be the unnamed 
section. If so, that could be another option, default_is_unnamed (default 
False, if True this implies allow_unnamed_section). But I'm not sure the 
additional complexity is worth it.

----------
nosy: +pmoore

_______________________________________
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