Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d5feb497
Commit
d5feb497
authored
Jan 29, 2017
by
Martin Panter
Browse files
Options
Browse Files
Download
Plain Diff
Issues #11670: Merge configparser doc from 3.6
parents
ba964cc5
e334a533
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Doc/library/configparser.rst
Doc/library/configparser.rst
+6
-6
No files found.
Doc/library/configparser.rst
View file @
d5feb497
...
...
@@ -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 *f
p* 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(f
p
):
line = f
p
.readline()
while line:
yield line
line = f.readline()
line = f
p
.readline()
Instead of ``parser.readfp(f)`` use
``parser.read_file(readline_generator(f))``.
Instead of ``parser.readfp(f
p
)`` use
``parser.read_file(readline_generator(f
p
))``.
.. data:: MAX_INTERPOLATION_DEPTH
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment