Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Makefunctions param to secondary_x/yaxis not keyword-only.#28133

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
QuLogic merged 1 commit intomatplotlib:mainfromanntzer:saxkw
Apr 25, 2024

Conversation

anntzer
Copy link
Contributor

I suspect the parameter was made keyword-only because the originally planned signature (#11859) wassecondary_xaxis(location, forward=..., inverse=...) where the keywords actually add some semantics (though that signature overall seems worse); however, for a singlefunctions parameter, having to type an extrafunctions= in the call doesn't help the reader much (either they know what secondary_x/yaxis does, in which case the explicit kwarg doesn't matter, or they don't, in which case the kwarg name hardly helps)... and is a bit annoying. See the modified gallery entry, for example.

PR summary

PR checklist

@github-actionsgithub-actionsbot added the Documentation: user guidefiles in galleries/users_explain or doc/users labelApr 24, 2024
Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ok. Stubs need to be updated.

I suspect the parameter was made keyword-only because the originallyplanned signature was `secondary_xaxis(location, forward=...,inverse=...)` where the keywords actually add some semantics (thoughthat signature overall seems worse); however, for a single `functions`parameter, having to type an extra `functions=` in the call doesn't helpthe reader much (either they know what secondary_x/yaxis does, in whichcase the explicit kwarg doesn't matter, or they don't, in which case thekwarg name hardly helps)... and is a bit annoying.  See the modifiedgallery entry, for example.
@anntzer
Copy link
ContributorAuthor

oops, done.

@oscargus
Copy link
Member

Is an API change note worthwhile? If not, anyone can merge.

@oscargusoscargus added this to thev3.10.0 milestoneApr 25, 2024
@timhoffm
Copy link
Member

An API change note is not neccessary since we're only relaxing the API. It's also not very helpful: Nobody will read through API changes, see this and take an action ("Finally, this is not kwonly anymore - I go through my code and change to positional use" is not gonna happen). So the note would mostly be noise. The only possible benefit would be a.. versionchanged:: note in the function, so that a user could decide to write backward-compatible code. - But then again. I don't think, we have such information consistently. I would not bother.

@QuLogicQuLogic merged commit91234e2 intomatplotlib:mainApr 25, 2024
43 of 44 checks passed
@anntzeranntzer deleted the saxkw branchApril 25, 2024 16:25
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

@oscargusoscargusoscargus approved these changes

Assignees
No one assigned
Labels
Documentation: user guidefiles in galleries/users_explain or doc/users
Projects
None yet
Milestone
v3.10.0
Development

Successfully merging this pull request may close these issues.

4 participants
@anntzer@oscargus@timhoffm@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp