summaryrefslogtreecommitdiff
path: root/Python/future.c
diff options
context:
space:
mode:
authorKyle Stanley <aeros167@gmail.com>2019-09-14 16:29:23 -0400
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-09-14 13:29:23 -0700
commitff603f6c3d3dc0e9ea8c1c51ce907c4821f42c54 (patch)
tree59496687c0df4517c76560f28cdea04021d66e8a /Python/future.c
parenteb2b0c694aef6122fdf95015abb24e0d095b6401 (diff)
downloadcpython-git-ff603f6c3d3dc0e9ea8c1c51ce907c4821f42c54.tar.gz
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
Diffstat (limited to 'Python/future.c')
0 files changed, 0 insertions, 0 deletions