Łukasz Langa added the comment:

I don't like the idea to magically introduce a '' section since this behaviour 
would be confusing for interpolation and not particularly discoverable by 
programmers. Let alone bikeshedding if this should rather be a None section.

Using DEFAULTSECT for this purpose is equally wrong since it would silently 
inject default values to every section, which may or may not be desirable.

All in all, it comes down to the question whether the programmer expects 
section-less configuration. If not, the '' section will not be helpful anyway. 
If yes, then it's desirable to be able to specify a section name for global 
options at *read time*. Symmetrically, the user could specify which section 
name to omit during configuration writing. I like that since it's explicit and 
more composable than a blanket global section. It would also be 100% backwards 
compatible.

I'll prepare a patch for this idea so we can see how good this API looks like 
in practice.

----------

_______________________________________
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