cpython/Doc/tutorial
Kyle Stanley ff603f6c3d bpo-37635: Update arg name for seek() in IO tutorial (GH-16147)
Typically, the second positional argument for ``seek()`` is *whence*. That is the POSIX standard name (http://man7.org/linux/man-pages/man3/lseek.3p.html) and the name listed in the documentation for ``io`` module (https://docs.python.org/3/library/io.html#io.IOBase.seek). 

The tutorial for IO is the only location where the second positional argument for ``seek()`` is referred to as *from_what*. I suspect this was created at an early point in Python's history, and was never updated (as this section predates the GitHub repository):

```
$ git grep "from_what"
Doc/tutorial/inputoutput.rst:To change the file object's position, use ``f.seek(offset, from_what)``.  The position is computed
Doc/tutorial/inputoutput.rst:the *from_what* argument.  A *from_what* value of 0 measures from the beginning
Doc/tutorial/inputoutput.rst:the reference point.  *from_what* can be omitted and defaults to 0, using the
```

For consistency, I am suggesting that the tutorial be updated to use the same argument name as the IO documentation and POSIX standard for ``seek()``, particularly since this is the only location where *from_what* is being used.

Note: In the POSIX standard, *whence* is technically the third positional argument, but the first argument *fildes* (file descriptor) is implicit in Python.


https://bugs.python.org/issue37635
2019-09-14 13:29:23 -07:00
..
appendix.rst Improve highlighting of some code blocks. (GH-6401) 2018-04-08 19:18:04 +03:00
appetite.rst
classes.rst bpo-12634: Clarify an awkward section of the tutorial (GH-15406) 2019-08-22 23:27:04 -07:00
controlflow.rst bpo-30826: Improve control flow examples (GH-15407) 2019-08-22 23:44:19 -07:00
datastructures.rst bpo-14050: Note that not all data can be sorted (GH-15381) 2019-08-22 09:11:35 -07:00
errors.rst Improve clarity of try-return-finally-return (GH-15677) 2019-09-11 17:37:13 +02:00
floatingpoint.rst Issue #27206: Fix doctests in Doc/tutorial. 2016-08-09 17:44:52 -05:00
index.rst #23891: add a section to the Tutorial describing virtual environments and pip 2015-06-08 17:35:45 -04:00
inputoutput.rst bpo-37635: Update arg name for seek() in IO tutorial (GH-16147) 2019-09-14 13:29:23 -07:00
interactive.rst bpo-25910: Fixes redirection from http to https (#4674) 2017-12-06 17:39:33 +01:00
interpreter.rst Improve Windows commands in tutorial (GH-14379) 2019-06-26 08:55:57 -07:00
introduction.rst bpo-14112: Allow beginners to explore shallowness in greater depth ;-) (GH-15465) 2019-08-24 11:15:44 -07:00
modules.rst bpo-37392: Update the dir(sys) in module tutorial (GH-14365) 2019-06-25 14:16:54 +02:00
stdlib.rst bpo-37726: Prefer argparse over getopt in stdlib tutorial (#15052) 2019-08-01 07:17:30 -07:00
stdlib2.rst Bump to 3.9.0a0 2019-06-04 22:12:32 +02:00
venv.rst bpo-37403: Touch up venv docs (GH-14458) 2019-06-28 12:14:31 -07:00
whatnow.rst Add a footnote about Cheese Shop in Doc/tutorial (GH-13103) 2019-05-07 16:20:58 -04:00