mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#1090076: explain the behavior of *vars* in get() better.
This commit is contained in:
parent
6a74d34d7c
commit
470a123910
2 changed files with 15 additions and 12 deletions
|
@ -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.
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue