-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-85864: Add missing position-only parameters #91950
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
Conversation
@JelleZijlstra Could you take a look at this follow-up? Main question I have is just on the formatting (the screenshot) |
Thanks, looks good. Thanks also for the explanation of the script you ran. Do we document what the |
This doesn't say anything about position-only, so it might still be needed, though the slash does look a bit odd with the brackets |
Also related: #91485 (comment) So maybe the way forward is to just document all default values instead of leaving them empty with square brackets |
Agree, if there's a sensible default value we can show we should avoid the |
Thanks @slateny for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
GH-92085 is a backport of this pull request to the 3.10 branch. |
GH-92086 is a backport of this pull request to the 3.9 branch. |
…GH-91950) (cherry picked from commit 3a8e2b6) Co-authored-by: slateny <[email protected]>
(cherry picked from commit 3a8e2b6) Co-authored-by: slateny <[email protected]>
(cherry picked from commit 3a8e2b6) Co-authored-by: slateny <[email protected]>
…GH-91950) (cherry picked from commit 3a8e2b6) Co-authored-by: slateny <[email protected]>
#85864
One possible issue though is formatting: for example,
read1
(rst here) looks something like this:and I'm not sure if that's correct and I couldn't quite find any precedent to refer to.
Continuation of #91683 - turns out there are a whole lot more functions with position-only parameters than I thought, so this is how I checked them:
To get all methods in the docs with at least one parameter:
which gives
Then of those methods, get all methods that don't have trailing position-only markers:
which gave
reconfigure
, the only method with parameters that doesn't have position-only parameters. Then to confirm that the docs do note that all methods with parameters have the marker:which outputs
configure
, which matches. Functions/classes were checked manually since there were fewer.