-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Cleanup xticks/yticks docstrings. #15789
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
This will only be correct after #15788 is in. For the current state, there would be no hint thatthat labels without ticks don't work. Also IMHO the MATLAB-like API should somehow be mentioned (that was part of the pupose of the call signature). Having the same function work as getter/setter depending on passing parameters is a bit unusual for Python. To be precise, while the return value is documented, it is not obvious that |
The beginning of the docstring literally states "Get or set ...". I guess "Set and get" would be slightly more accurate? |
Technically, yes, but with the inexplicit "Set nothing and get", which is quite obscure. |
"Set and/or get"? |
Formally correct, but ugly (which reflects the API). I'm +0.5 for just sticking with "Get or set" plus an extra sentence "Pass no argument to return the current value without modifying it." |
sounds good to me, done |
Also compressed the examples a bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will only be correct after #15788 is in. For the current state, there would be no hint thatthat labels without ticks don't work.
still holds, and it's not yet clear if that's going to be accepted.
happy to wait for the discussion on the other PR to be resolved first |
- Don't bother listing call signatures (the normal function signature is fine). - Slightly tighten the parameters/return value descriptions.
Edited as needed following the rejection of #15788. |
…789-on-v3.2.x Backport PR #15789 on branch v3.2.x (Cleanup xticks/yticks docstrings.)
fine).
PR Summary
PR Checklist