-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
Documentation for bisect
with keys
#102833
Comments
I don't know whether not adding key doc to docstrings was intentional or accidental. Given that docstrings are meant to be a condensed reminder of the full doc and how key changes the meaning of the second parameter, it might have been intentional. I agree that the current key doc is a bit confusing, but I dislike splitting the signature. I would like to suggest the following, which is true for the second parameter,
as replacement for
but everything above this sentence, I presume written before key functions were added, assumes that 'x' is an item similar to those in the list and a potential addition. I have more potential suggestions to fix this, but will hold them until Raymond replies. For me, 'searching for an unknown x by known key' does not add anything. |
Mostly, we keep the docstrings more terse than the main docs since they are mainly used as a reminder. Note, the That said, there is no downside to expanding the docstring a bit. So, I will add wording along the lines in the
I don't think that is clearer at all. FWIW, the wording that follows should add clarity and there are worked out examples at the bottom on the page. This should be all most people need. |
Documentation
Missing documentation for keys in
bisect
functions' doc-strings.I've also found the wording in the official documentation to be a little confusing. I think it might be clearer to use an overloaded definition like this:
Linked PRs
The text was updated successfully, but these errors were encountered: