[Python-checkins] cpython (merge 3.6 -> default): Issues #11670: Merge configparser doc from 3.6
martin.panter
python-checkins at python.org
Sun Jan 29 18:48:17 EST 2017
https://hg.python.org/cpython/rev/6db0a62b6aa6
changeset: 106343:6db0a62b6aa6
parent: 106342:e50058ecd808
parent: 106341:e06de6f9cfe5
user: Martin Panter <vadmium+py at gmail.com>
date: Sun Jan 29 23:37:50 2017 +0000
summary:
Issues #11670: Merge configparser doc from 3.6
files:
Doc/library/configparser.rst | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst
--- a/Doc/library/configparser.rst
+++ b/Doc/library/configparser.rst
@@ -1161,20 +1161,20 @@
Use :meth:`read_file` instead.
.. versionchanged:: 3.2
- :meth:`readfp` now iterates on *f* instead of calling ``f.readline()``.
+ :meth:`readfp` now iterates on *fp* instead of calling ``fp.readline()``.
For existing code calling :meth:`readfp` with arguments which don't
support iteration, the following generator may be used as a wrapper
around the file-like object::
- def readline_generator(f):
- line = f.readline()
+ def readline_generator(fp):
+ line = fp.readline()
while line:
yield line
- line = f.readline()
+ line = fp.readline()
- Instead of ``parser.readfp(f)`` use
- ``parser.read_file(readline_generator(f))``.
+ Instead of ``parser.readfp(fp)`` use
+ ``parser.read_file(readline_generator(fp))``.
.. data:: MAX_INTERPOLATION_DEPTH
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list