summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2017-01-29 23:33:27 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2017-01-29 23:33:27 (GMT)
commit1f10671fc809ffe44dbad4652a0ee651f5434e77 (patch)
tree2f059dbcee35775d20b0420e2cc13df71c48eaa8 /Doc
parent9a454021a4360f0036c9f24c5ccde39900fc1f23 (diff)
downloadcpython-1f10671fc809ffe44dbad4652a0ee651f5434e77.zip
cpython-1f10671fc809ffe44dbad4652a0ee651f5434e77.tar.gz
cpython-1f10671fc809ffe44dbad4652a0ee651f5434e77.tar.bz2
Issue #11670: readfp(fp) parameter name is different to read_file(f)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/configparser.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst
index 8d141a2..e09562d 100644
--- a/Doc/library/configparser.rst
+++ b/Doc/library/configparser.rst
@@ -1161,20 +1161,20 @@ ConfigParser Objects
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