This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rk
Recipients rk
Date 2016-07-21.12:54:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1469105653.63.0.572086425799.issue27583@psf.upfronthosting.co.za>
In-reply-to
Content
Modifying "default_section" in the configparser at runtime does not behave as described.

The documentation says about default_section: 

When default_section is given, it specifies the name for the special section holding default values for other sections and interpolation purposes (normally named "DEFAULT"). This value can be retrieved and changed on runtime using the default_section instance attribute.
[https://docs.python.org/3/library/configparser.html]

So, if I modify default_section at runtime, the default values for other sections should then come from the new default_section. But this is not the case. Instead, the default-values still come from self._default, which was set by self._read.

So, this is either a bug in the library or a bug in the documentation.

I've attached a testcase.
History
Date User Action Args
2016-07-21 12:54:13rksetrecipients: + rk
2016-07-21 12:54:13rksetmessageid: <1469105653.63.0.572086425799.issue27583@psf.upfronthosting.co.za>
2016-07-21 12:54:13rklinkissue27583 messages
2016-07-21 12:54:13rkcreate