[docs] [issue37635] Using constant for whence arg in seek()

Kyle Stanley report at bugs.python.org
Fri Jul 26 03:34:49 EDT 2019

Kyle Stanley <aeros167 at gmail.com> added the comment:

Upon further consideration, I think that it would be best to leave the code examples as is in the "inputoutput" tutorial, but it still be worth mentioning that the constants exist as alternatives. This is due to adding the additional step of "import io" in order to be able to access the constants. The tutorial code examples should probably aim to not add additional extra lines that are not needed.

While I was working on a PR for updating the tutorial, I noticed that the second argument's name for seek() was  *from_what* instead of *whence*. Was this an older name for the argument that is now outdated or am I missing something?

Doc/tutorial: https://github.com/python/cpython/blob/master/Doc/tutorial/inputoutput.rst#methods-of-file-objects

Doc/library: https://docs.python.org/3/library/io.html#io.IOBase.seek


Python tracker <report at bugs.python.org>

More information about the docs mailing list