diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2016-11-07 22:15:01 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2016-11-07 22:15:01 (GMT) |
commit | f46b7823e6c64c1e0b6dd67643a45c71f5900b05 (patch) | |
tree | 062be8e7e5bba0113d83b344b9542ef0b97f1e8e /Lib/idlelib/config.py | |
parent | f5df73025d42de4269b8348c42d0a1aa2fa44649 (diff) | |
download | cpython-f46b7823e6c64c1e0b6dd67643a45c71f5900b05.zip cpython-f46b7823e6c64c1e0b6dd67643a45c71f5900b05.tar.gz cpython-f46b7823e6c64c1e0b6dd67643a45c71f5900b05.tar.bz2 |
Issue #28572: Add 10% to coverage of IDLE's test_configdialog.
Update and augment description of the configuration system.
Diffstat (limited to 'Lib/idlelib/config.py')
-rw-r--r-- | Lib/idlelib/config.py | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/Lib/idlelib/config.py b/Lib/idlelib/config.py index 10fe3ba..358bee4 100644 --- a/Lib/idlelib/config.py +++ b/Lib/idlelib/config.py @@ -1,13 +1,20 @@ -"""Provides access to stored IDLE configuration information. - -Refer to the comments at the beginning of config-main.def for a description of -the available configuration files and the design implemented to update user -configuration information. In particular, user configuration choices which -duplicate the defaults will be removed from the user's configuration files, -and if a file becomes empty, it will be deleted. - -The contents of the user files may be altered using the Options/Configure IDLE -menu to access the configuration GUI (configdialog.py), or manually. +"""idlelib.config -- Manage IDLE configuration information. + +The comments at the beginning of config-main.def describe the +configuration files and the design implemented to update user +configuration information. In particular, user configuration choices +which duplicate the defaults will be removed from the user's +configuration files, and if a user file becomes empty, it will be +deleted. + +The configuration database maps options to values. Comceptually, the +database keys are tuples (config-type, section, item). As implemented, +there are separate dicts for default and user values. Each has +config-type keys 'main', 'extensions', 'highlight', and 'keys'. The +value for each key is a ConfigParser instance that maps section and item +to values. For 'main' and 'extenstons', user values override +default values. For 'highlight' and 'keys', user sections augment the +default sections (and must, therefore, have distinct names). Throughout this module there is an emphasis on returning useable defaults when a problem occurs in returning a requested configuration value back to |