Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1759)

Delta Between Two Patch Sets: Doc/library/io.rst

Issue 10142: Support for SEEK_HOLE/SEEK_DATA
Left Patch Set: Created 1 year, 1 month ago
Right Patch Set: Created 1 year ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Doc/library/os.rst » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 :mod:`io` --- Core tools for working with streams 1 :mod:`io` --- Core tools for working with streams
2 ================================================= 2 =================================================
3 3
4 .. module:: io 4 .. module:: io
5 :synopsis: Core tools for working with streams. 5 :synopsis: Core tools for working with streams.
6 .. moduleauthor:: Guido van Rossum <guido@python.org> 6 .. moduleauthor:: Guido van Rossum <guido@python.org>
7 .. moduleauthor:: Mike Verdone <mike.verdone@gmail.com> 7 .. moduleauthor:: Mike Verdone <mike.verdone@gmail.com>
8 .. moduleauthor:: Mark Russell <mark.russell@zen.co.uk> 8 .. moduleauthor:: Mark Russell <mark.russell@zen.co.uk>
9 .. moduleauthor:: Antoine Pitrou <solipsis@pitrou.net> 9 .. moduleauthor:: Antoine Pitrou <solipsis@pitrou.net>
10 .. moduleauthor:: Amaury Forgeot d'Arc <amauryfa@gmail.com> 10 .. moduleauthor:: Amaury Forgeot d'Arc <amauryfa@gmail.com>
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 be negative 285 be negative
286 * :data:`SEEK_END` or ``2`` -- end of the stream; *offset* is usually 286 * :data:`SEEK_END` or ``2`` -- end of the stream; *offset* is usually
287 negative 287 negative
288 288
289 Return the new absolute position. 289 Return the new absolute position.
290 290
291 .. versionadded:: 3.1 291 .. versionadded:: 3.1
292 The ``SEEK_*`` constants. 292 The ``SEEK_*`` constants.
293 293
294 .. versionadded:: 3.3 294 .. versionadded:: 3.3
295 Some Operating Systems can support aditional values, like 295 Some operating systems could support additional values, like
Charles-François Natali 2012/04/20 22:45:35 With capitals to "operating system"?
Charles-François Natali 2012/04/20 22:45:35 "aditional" -> "additional"
296 :const:`os.SEEK_HOLE` or :const:`os.SEEK_DATA`. The valid values 296 :data:`os.SEEK_HOLE` or :data:`os.SEEK_DATA`. The valid values
Charles-François Natali 2012/04/20 22:45:35 I think it should be :data:, not :const:.
297 for a file could depend of it being open in text or binary mode. 297 for a file could depend on it being open in text or binary mode.
298 298
299 .. method:: seekable() 299 .. method:: seekable()
300 300
301 Return ``True`` if the stream supports random access. If ``False``, 301 Return ``True`` if the stream supports random access. If ``False``,
302 :meth:`seek`, :meth:`tell` and :meth:`truncate` will raise :exc:`OSError`. 302 :meth:`seek`, :meth:`tell` and :meth:`truncate` will raise :exc:`OSError`.
303 303
304 .. method:: tell() 304 .. method:: tell()
305 305
306 Return the current stream position. 306 Return the current stream position.
307 307
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 they can arise from doing I/O in a :mod:`signal` handler. If a thread tries to 890 they can arise from doing I/O in a :mod:`signal` handler. If a thread tries to
891 renter a buffered object which it is already accessing, a :exc:`RuntimeError` is 891 renter a buffered object which it is already accessing, a :exc:`RuntimeError` is
892 raised. Note this doesn't prohibit a different thread from entering the 892 raised. Note this doesn't prohibit a different thread from entering the
893 buffered object. 893 buffered object.
894 894
895 The above implicitly extends to text files, since the :func:`open()` function 895 The above implicitly extends to text files, since the :func:`open()` function
896 will wrap a buffered object inside a :class:`TextIOWrapper`. This includes 896 will wrap a buffered object inside a :class:`TextIOWrapper`. This includes
897 standard streams and therefore affects the built-in function :func:`print()` as 897 standard streams and therefore affects the built-in function :func:`print()` as
898 well. 898 well.
899 899
LEFTRIGHT
« no previous file | Doc/library/os.rst » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7