Wolfgang Maier added the comment:

Well, you *can* change the value at runtime as you are demonstrating in your 
script, but you are misunderstanding the effect this will have. It *won't* 
cause a reevaluation of an already parsed config file. Instead it will affect 
the writing of the parsed settings to a new config file.
This is explained a bit further up in the documentation of the module:
https://docs.python.org/3/library/configparser.html#customizing-parser-behaviour
where it says: "Its current value can be retrieved using the 
parser_instance.default_section attribute and may be modified at runtime (i.e. 
to convert files from one format to another)."

So maybe this hint could be repeated in the actual parameter description of 
https://docs.python.org/3/library/configparser.html#configparser-objects to 
avoid confusion, but I don't think there is a bug here.

----------
nosy: +wolma

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

Reply via email to