diff options
author | Georg Brandl <georg@python.org> | 2010-07-29 14:17:12 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-07-29 14:17:12 (GMT) |
commit | 470a123910c1f1d71f379d1ffdd84f2161c3bc20 (patch) | |
tree | 01acc44b71ade506cf966438c3d70f48163223ce /Lib/configparser.py | |
parent | 6a74d34d7c8e9280efb1f4c72b07938c3436c18b (diff) | |
download | cpython-470a123910c1f1d71f379d1ffdd84f2161c3bc20.zip cpython-470a123910c1f1d71f379d1ffdd84f2161c3bc20.tar.gz cpython-470a123910c1f1d71f379d1ffdd84f2161c3bc20.tar.bz2 |
#1090076: explain the behavior of *vars* in get() better.
Diffstat (limited to 'Lib/configparser.py')
-rw-r--r-- | Lib/configparser.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/configparser.py b/Lib/configparser.py index 7ad24d8..6e38f26 100644 --- a/Lib/configparser.py +++ b/Lib/configparser.py @@ -661,11 +661,12 @@ class ConfigParser(RawConfigParser): def get(self, section, option, raw=False, vars=None): """Get an option value for a given section. - All % interpolations are expanded in the return values, based on the - defaults passed into the constructor, unless the optional argument - `raw' is true. Additional substitutions may be provided using the - `vars' argument, which must be a dictionary whose contents overrides - any pre-existing defaults. + If `vars' is provided, it must be a dictionary. The option is looked up + in `vars' (if provided), `section', and in `defaults' in that order. + + All % interpolations are expanded in the return values, unless the + optional argument `raw' is true. Values for interpolation keys are + looked up in the same manner as the option. The section DEFAULT is special. """ |