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
f8ece8d7
Commit
f8ece8d7
authored
Apr 28, 2012
by
Sandro Tosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refer to file.readline() in stdtypes doc; thanks to Mihai Capotă from docs@
parent
2d0bcd7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+3
-3
No files found.
Doc/library/stdtypes.rst
View file @
f8ece8d7
...
...
@@ -2378,7 +2378,7 @@ Files have the following methods:
make a :keyword:`for` loop the most efficient way of looping over the lines of a
file (a very common operation), the :meth:`~file.next` method uses a hidden read-ahead
buffer. As a consequence of using a read-ahead buffer, combining :meth:`~file.next`
with other file methods (like :meth:`readline`) does not work right. However,
with other file methods (like :meth:`
~file.
readline`) does not work right. However,
using :meth:`seek` to reposition the file to an absolute position will flush the
read-ahead buffer.
...
...
@@ -2420,7 +2420,7 @@ Files have the following methods:
.. method:: file.readlines([sizehint])
Read until EOF using :meth:`readline` and return a list containing the lines
Read until EOF using :meth:`
~file.
readline` and return a list containing the lines
thus read. If the optional *sizehint* argument is present, instead of
reading up to EOF, whole lines totalling approximately *sizehint* bytes
(possibly after rounding up to an internal buffer size) are read. Objects
...
...
@@ -2500,7 +2500,7 @@ Files have the following methods:
add line separators.)
Files support the iterator protocol. Each iteration returns the same result as
``file.readline()``, and iteration ends when the :meth:`
readline` method returns
:meth:`~file.readline`, and iteration ends when the :meth:`~file.
readline` method returns
an empty string.
File objects also offer a number of other interesting attributes. These are not
...
...
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