mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
Merged #11670 from 3.2
This commit is contained in:
commit
29050d7317
3 changed files with 82 additions and 9 deletions
|
@ -695,10 +695,10 @@ class RawConfigParser(MutableMapping):
|
|||
def read_file(self, f, source=None):
|
||||
"""Like read() but the argument must be a file-like object.
|
||||
|
||||
The `f' argument must have a `readline' method. Optional second
|
||||
argument is the `source' specifying the name of the file being read. If
|
||||
not given, it is taken from f.name. If `f' has no `name' attribute,
|
||||
`<???>' is used.
|
||||
The `f' argument must be iterable, returning one line at a time.
|
||||
Optional second argument is the `source' specifying the name of the
|
||||
file being read. If not given, it is taken from f.name. If `f' has no
|
||||
`name' attribute, `<???>' is used.
|
||||
"""
|
||||
if source is None:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue