]> granicus.if.org Git - python/commitdiff
Issue #11670: readfp(fp) parameter name is different to read_file(f)
authorMartin Panter <vadmium+py@gmail.com>
Sun, 29 Jan 2017 23:33:27 +0000 (23:33 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Sun, 29 Jan 2017 23:33:27 +0000 (23:33 +0000)
Doc/library/configparser.rst

index 8d141a2af7a2649e48e28e5efa74819a2d02eb8e..e09562dc9046c7854d668e8d070e002d91bacdb2 100644 (file)
@@ -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