New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
io.[Text]IOBase.seek doesn't take keyword parameter #69218
Comments
The doc is here: https://docs.python.org/3.5/library/io.html#io.IOBase.seek It is said the parameter list is in the form of: But actually only: Passing seek(offset, whence=SEEK_FOOBAR) will throw an error. The patch fixes the function signature as seek(offset[, whence]) |
This also bugs me, and the same problem exists in other parts of the documentation. Perhaps you might be interested in bpo-23738 and whether changing to the new notation used by PEP-457, pydoc, help(), Argument Clinic is any good: seek(offset, whence=SEEK_SET, /) But in the mean time, I think the proposed patch is okay, and would certainly benefit the Python 2 documetation where using the new PEP-457 slash indicator is less likely to be appropriate. |
Thanks for your comment. I had a read of PEP-457. It's still in draft status, so incorporating Any further modification for me to do to get that merged? |
I will try to commit your patch today when I up to it. Maybe the “draft” status of that PEP is out of date. The slash (/) indicator is already being used in some places in pydoc, e.g. $ pydoc object.__eq__
Help on wrapper_descriptor in object: object.__eq__ = __eq__(self, value, /)
Return self==value. |
New changeset 0ca216f5276e by Martin Panter <vadmium> in branch '3.4': New changeset 77784422da4d by Martin Panter <vadmium> in branch '2.7': New changeset a0c6f5358029 by Martin Panter <vadmium> in branch '3.5': New changeset c4bb0da8b45e by Martin Panter <vadmium> in branch 'default': |
Thanks for the patch. I took the liberty of also fixing the doc string of BytesIO.seek(). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: