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

Kyle Stanley report at bugs.python.org
Fri Jul 26 15:33:38 EDT 2019

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

> I don't know. "whence" is the official name of the argument in the POSIX API

> Perhaps "from_what" is assumed to be more understandable by the average reader?

>From looking at the blame on GitHub, it looks like the use of the "from_what" argument in the tutorial has been there for more than 12 years, since the last commit was a massive move of the doc tree.  The documentation for the IO module was added exactly 12 years (which included the usage of the *whence* argument rather than *from_what*) ago by birkenfield. Based on that information, I think the most likely answer is that the argument used to be *from_what* in a much older version of Python. To conform to the posix standard, it was changed to *whence*, but the tutorial was never updated.

If it was simply never updated, I think that it would be better to change it to *whence*. The difference would be more likely to confuse new users of the language, if they were to start with the tutorial and later refer to the IO module documentation. 

Also the tutorial provides a fairly in-depth explanation of the purpose of the argument within seek(), so I don't think using "from_what" as the name makes its purpose any more clear to the users.


Python tracker <report at bugs.python.org>

More information about the docs mailing list