You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
io.[Text]IOBase.seek doesn't take keyword parameter - revisited #85864
Activity
andy-maier commentedon Sep 3, 2020
I stumbled across the problem reported in https://bugs.python.org/issue25030 on Python 3.8:
Which I coded with a keyword argument because the documentation says so:
See https://docs.python.org/3.8/library/io.html#io.IOBase.seek
The fix for issue bpo-25030 changed the documentation to:
and supposedly was integrated into 2.7, 3.4, and the default branch back then.
It seems the fix got lost?
methane commentedon Sep 3, 2020
For the record, https://github.com/python/cpython/pull/14691/files reintroduced
whence=SEEK_SET.methane commentedon Sep 3, 2020
Since we have positional-only argument, can we document it as
seek(offset, whence=SEEK_SET, /)?andy-maier commentedon Sep 3, 2020
Thanks for referencing the PR that reintroduced the old way of documenting it.
From my perspective, the proposal is fine. There are already some cases where it is documented like that, e.g. str.removeprefix(prefix, /).
tomerv commentedon Oct 21, 2021
Just wanted to add that I encountered this today, went to file a ticket, and found this one. I'm fine with either style of documentation.
gh-85864: Mark positional-only args in io docs (#91683)
pythongh-85864: Mark positional-only args in io docs (pythonGH-91683)
[3.9] pythongh-85864: Mark positional-only args in io docs (pythonGH-…
gh-85864: Mark positional-only args in io docs (GH-91683)
[3.9] gh-85864: Mark positional-only args in io docs (GH-91683). (#91848
gh-85864: io docs: Add missing position-only parameters (#91950)
pythongh-85864: io docs: Add missing position-only parameters (python…
gh-85864: io docs: Add missing position-only parameters (GH-91950)
gh-85864: io docs: Add missing position-only parameters (GH-91950)
JelleZijlstra commentedon Apr 30, 2022
Thanks for the patches @slateny!
[3.9] pythongh-85864: Mark positional-only args in io docs (pythonGH-…
pythongh-85864: io docs: Add missing position-only parameters (python…