Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e334a53

Browse files
committed
Issues #11670: Merge configparser doc from 3.5
2 parents b154113 + 1f10671 commit e334a53

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Doc/library/configparser.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,20 +1161,20 @@ ConfigParser Objects
11611161
Use :meth:`read_file` instead.
11621162

11631163
.. versionchanged:: 3.2
1164-
:meth:`readfp` now iterates on *f* instead of calling ``f.readline()``.
1164+
:meth:`readfp` now iterates on *fp* instead of calling ``fp.readline()``.
11651165

11661166
For existing code calling :meth:`readfp` with arguments which don't
11671167
support iteration, the following generator may be used as a wrapper
11681168
around the file-like object::
11691169

1170-
def readline_generator(f):
1171-
line = f.readline()
1170+
def readline_generator(fp):
1171+
line = fp.readline()
11721172
while line:
11731173
yield line
1174-
line = f.readline()
1174+
line = fp.readline()
11751175

1176-
Instead of ``parser.readfp(f)`` use
1177-
``parser.read_file(readline_generator(f))``.
1176+
Instead of ``parser.readfp(fp)`` use
1177+
``parser.read_file(readline_generator(fp))``.
11781178

11791179

11801180
.. data:: MAX_INTERPOLATION_DEPTH

0 commit comments

Comments
 (0)