@@ -403,20 +403,19 @@ I/O Base Classes
403
403
Note that it's already possible to iterate on file objects using ``for
404
404
line in file: ... `` without calling :meth: `!file.readlines `.
405
405
406
- .. method :: seek(offset, whence=SEEK_SET, /)
406
+ .. method :: seek(offset, whence=os. SEEK_SET, /)
407
407
408
- Change the stream position to the given byte *offset *. *offset * is
409
- interpreted relative to the position indicated by *whence *. The default
410
- value for *whence * is :data: `!SEEK_SET `. Values for *whence * are:
408
+ Change the stream position to the given byte *offset *,
409
+ interpreted relative to the position indicated by *whence *,
410
+ and return the new absolute position.
411
+ Values for *whence * are:
411
412
412
- * :data: `! SEEK_SET ` or ``0 `` -- start of the stream (the default);
413
+ * :data: `os. SEEK_SET ` or ``0 `` -- start of the stream (the default);
413
414
*offset * should be zero or positive
414
- * :data: `!SEEK_CUR ` or ``1 `` -- current stream position; *offset * may
415
- be negative
416
- * :data: `!SEEK_END ` or ``2 `` -- end of the stream; *offset * is usually
417
- negative
418
-
419
- Return the new absolute position.
415
+ * :data: `os.SEEK_CUR ` or ``1 `` -- current stream position;
416
+ *offset * may be negative
417
+ * :data: `os.SEEK_END ` or ``2 `` -- end of the stream;
418
+ *offset * is usually negative
420
419
421
420
.. versionadded :: 3.1
422
421
The :data: `!SEEK_* ` constants.
@@ -1061,14 +1060,17 @@ Text I/O
1061
1060
Any other argument combinations are invalid,
1062
1061
and may raise exceptions.
1063
1062
1063
+ .. seealso ::
1064
+
1065
+ :data: `os.SEEK_SET `, :data: `os.SEEK_CUR `, and :data: `os.SEEK_END `.
1066
+
1064
1067
.. method :: tell()
1065
1068
1066
1069
Return the stream position as an opaque number.
1067
1070
The return value of :meth: `!tell ` can be given as input to :meth: `seek `,
1068
1071
to restore a previous stream position.
1069
1072
1070
1073
1071
-
1072
1074
.. class :: StringIO(initial_value='', newline='\n')
1073
1075
1074
1076
A text stream using an in-memory text buffer. It inherits
0 commit comments