-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove axis() manual argument parsing. #24446
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
bda45ba
to
fda4c05
Compare
In general, I advocate making the API as narrow as possible so:
|
BTW: What is |
fda4c05
to
29e6e7f
Compare
Sure, made it positional only.
Having None be the default and mean the same as no args is pretty standard in Python, and I don't really like the idea of introducing _DEFAULT to strictly keep the same call semantics as previously (for example, distinguishing between None and unset is also the root issue of #24413); Axes.set() is a rather special case as here the signature absolutely cannot be spelled out without introducing such a placeholder. |
|
Still a real test failure. |
axis is now just a standard function taking 0-1 arguments. This change *does* make it possible to call `axis(None)` as synonym for `axis()`, as well as passing the sole argument under the name `arg` (unless we decide to switch to positional-only args) but that seems fine.
oops, fixed. |
29e6e7f
to
d94bc45
Compare
axis is now just a standard function taking 0-1 arguments. This change does make it possible to call
axis(None)
as synonym foraxis()
, as well as passing the sole argument under the namearg
(unless we decide to switch to positional-only args -- @timhoffm?) but that seems fine.PR Summary
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst