Repository navigation
Fix/update missing parameters in function signatures for Built-in Functions documentation #90250
Description
Activity
vivekvashist commented
on Dec 15, 2021 vivekvashistmannequinMannequinAuthorMore actionsPrevious issue:
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.
- addeddocsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error3.10 (EOL)end of lifeend of life
on Dec 15, 2021 - addeddocsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Dec 15, 2021 vivekvashist commented
on Dec 15, 2021 vivekvashistmannequinMannequinAuthorMore actionsPR: #30128
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.
Reacted by Hugo van Kemenade3 remaining items
- removed3.11only security fixesonly security fixes3.10 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of life
on Feb 9, 2024 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. AaslandI 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.
Please could you open a discussion, or issue at https://github.com/python/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
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.
Reacted by Erlend E. AaslandI think Alex made a good point in #90250 (comment):
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 forfuncinconsistent with each other.Yes, but I think that discussion should be on Discuss 🙂
Reacted by Erlend E. AaslandYes, but I think that discussion should be on Discuss 🙂
I agree :)
Sounds to me we can close this as not-planned, and continue the discussion in a broader forum :)
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.Reacted by Erlend E. AaslandI 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.
Reacted by ÉricCompleted in 65fb4d1.
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: