File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -982,15 +982,16 @@ ConfigParser Objects
982
982
983
983
.. method :: read(filenames, encoding=None)
984
984
985
- Attempt to read and parse a list of filenames, returning a list of
985
+ Attempt to read and parse an iterable of filenames, returning a list of
986
986
filenames which were successfully parsed.
987
987
988
988
If *filenames * is a string or :term: `path-like object `, it is treated as
989
989
a single filename. If a file named in *filenames * cannot be opened, that
990
- file will be ignored. This is designed so that you can specify a list of
991
- potential configuration file locations (for example, the current
992
- directory, the user's home directory, and some system-wide directory),
993
- and all existing configuration files in the list will be read.
990
+ file will be ignored. This is designed so that you can specify an
991
+ iterable of potential configuration file locations (for example, the
992
+ current directory, the user's home directory, and some system-wide
993
+ directory), and all existing configuration files in the iterable will be
994
+ read.
994
995
995
996
If none of the named files exist, the :class: `ConfigParser `
996
997
instance will contain an empty dataset. An application which requires
Original file line number Diff line number Diff line change 80
80
Return list of configuration options for the named section.
81
81
82
82
read(filenames, encoding=None)
83
- Read and parse the list of named configuration files, given by
83
+ Read and parse the iterable of named configuration files, given by
84
84
name. A single filename is also allowed. Non-existing files
85
85
are ignored. Return list of successfully read files.
86
86
@@ -677,13 +677,13 @@ def options(self, section):
677
677
return list (opts .keys ())
678
678
679
679
def read (self , filenames , encoding = None ):
680
- """Read and parse a filename or a list of filenames.
680
+ """Read and parse a filename or an iterable of filenames.
681
681
682
682
Files that cannot be opened are silently ignored; this is
683
- designed so that you can specify a list of potential
683
+ designed so that you can specify an iterable of potential
684
684
configuration file locations (e.g. current directory, user's
685
685
home directory, systemwide directory), and all existing
686
- configuration files in the list will be read. A single
686
+ configuration files in the iterable will be read. A single
687
687
filename may also be given.
688
688
689
689
Return list of successfully read files.
You can’t perform that action at this time.
0 commit comments