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
Fix/update missing parameters in function signatures for Built-in Functions documentation #90250
My understanding is that we're holding off on adding the slash notation to the main docs. The reason is that they are mostly unintelligible to the average user.
Noticed that new removeprefix() and removesuffix() functions that were added in 3.9 have slash notation added in Built-in Types document[ation]
This could be removed then 🙂 It does not necessarily mean that all other instances can use slash.
I think there should be a broader agreement (than just a PR and reviews) on this doc convention, with a Discuss thread or by asking the docs editorial board.
Reacted by Hugo van Kemenade, C.A.M. Gerlach and Erlend E. Aasland
I don't think changes like this (from #30128) are much of an improvement:
-.. function:: abs(x)+.. function:: abs(x, /)
I think there should be a broader agreement (than just a PR and reviews) on this doc convention, with a Discuss thread or by asking the docs editorial board.
changed the title [-]Fix/update missing parameters in function signatures for Built-in Functions documentation.[/-][+]Fix/update missing parameters in function signatures for Built-in Functions documentation[/+]on Feb 10, 2024
Absent a well-motivated reason for the particular difference, there seems to be at least some value in making the docs and the docstrings consistent here on param naming, at least for the frequently-used builtin functions documented here. These builtins are the functions first and likely some of the most frequently used by new beginners, who are most likely to be unnecessarily confused why the parameter names shown by help and the docs differ.
As for /, I believe this has been discussed before on Discourse in this context (though couldn't find the thread), with mixed opinions; it aids consistently, correctness and explicitness as expected in a reference doc like this, but there was also significant concern it could be a point of confusion for beginners. My suggestion there was to automatically make / (and *) either an :abbr: with a short popup explaining its meaning (e.g. Parameters to the left of / are positional-only, or The parameters to the left can only be passed by position, not keyword); or a cross-reference link to the appropriate glossary entry or explanation.
In any case, IMO a further discussion on Discourse would be best as the first port of call, and if there isn't consensus, asking the EB to consider the matter.
If the view is that the slash notation should not be added to this piece of documentation, since it is aimed at beginners, should help() be changed so that it does not include the slash notation for built-in functions?
We should consider the implications (for beginners) of leaving help(func) and the docs for func inconsistent with each other.
IMO closing as not-planned would be the outcome of a discussion, not an indicator that a discussion is happening at the moment.
OTOH it’s easy to close and to reopen later.
Activity
vivekvashist commentedon Dec 15, 2021
Previous issue:
#30113 (comment)
As noted/pointed by Alex - I went through all the Built-in Functions and updated/fixed the missing parameters.
I'll raise a PR shortly.
vivekvashist commentedon Dec 15, 2021
PR: #30128
rhettinger commentedon Dec 16, 2021
My understanding is that we're holding off on adding the slash notation to the main docs. The reason is that they are mostly unintelligible to the average user.
3 remaining items
merwok commentedon Feb 10, 2024
This could be removed then 🙂 It does not necessarily mean that all other instances can use slash.
I think there should be a broader agreement (than just a PR and reviews) on this doc convention, with a Discuss thread or by asking the docs editorial board.
hugovk commentedon Feb 10, 2024
I don't think changes like this (from #30128) are much of an improvement:
Please could you open a discussion, or issue at https://github.com/python/editorial-board/?
[-]Fix/update missing parameters in function signatures for Built-in Functions documentation.[/-][+]Fix/update missing parameters in function signatures for Built-in Functions documentation[/+]CAM-Gerlach commentedon Feb 10, 2024
Absent a well-motivated reason for the particular difference, there seems to be at least some value in making the docs and the docstrings consistent here on param naming, at least for the frequently-used builtin functions documented here. These builtins are the functions first and likely some of the most frequently used by new beginners, who are most likely to be unnecessarily confused why the parameter names shown by
helpand the docs differ.As for
/, I believe this has been discussed before on Discourse in this context (though couldn't find the thread), with mixed opinions; it aids consistently, correctness and explicitness as expected in a reference doc like this, but there was also significant concern it could be a point of confusion for beginners. My suggestion there was to automatically make/(and*) either an:abbr:with a short popup explaining its meaning (e.g.Parameters to the left of / are positional-only, orThe parameters to the left can only be passed by position, not keyword); or a cross-reference link to the appropriate glossary entry or explanation.In any case, IMO a further discussion on Discourse would be best as the first port of call, and if there isn't consensus, asking the EB to consider the matter.
erlend-aasland commentedon Feb 12, 2024
I think Alex made a good point in #90250 (comment):
We should consider the implications (for beginners) of leaving
help(func)and the docs forfuncinconsistent with each other.merwok commentedon Feb 12, 2024
Yes, but I think that discussion should be on Discuss 🙂
erlend-aasland commentedon Feb 12, 2024
I agree :)
erlend-aasland commentedon Feb 12, 2024
Sounds to me we can close this as not-planned, and continue the discussion in a broader forum :)
merwok commentedon Feb 12, 2024
IMO closing as not-planned would be the outcome of a discussion, not an indicator that a discussion is happening at the moment.
OTOH it’s easy to close and to reopen later.
erlend-aasland commentedon Feb 13, 2024
I closed the PR. It does not make sense to continue working on it until there is a general agreement. I'm fine with keeping this open.
StanFromIreland commentedon Aug 20, 2026
Completed in 65fb4d1.