Skip to content
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

Fix bug where argument was ignored #188

Merged
merged 3 commits into from
Sep 3, 2018

Conversation

canyon289
Copy link
Member

@canyon289 canyon289 commented Sep 2, 2018

While the code works, the posterior argument is ignored and to a human it looks like a second non keyword argument is actually doing something when it isnt

@ColCarroll Out of curiosity why is an api where all non keyword arguments are ignored, except the first one preferred?

(obj, *_, group='posterior', coords=None, dims=None)

Before change
image

@ahartikainen
Copy link
Contributor

I think instead of

(obj, *_, group='posterior', coords=None, dims=None)

it should be

(obj, *, group='posterior', coords=None, dims=None)

which will throw a TypeError exception.

@canyon289
Copy link
Member Author

canyon289 commented Sep 3, 2018

Fair point, not sure if the idea is to ignore extra arguments, or disallow extra arguments. The pattern is repeating in a couple other functions as well so I think its intentional and not a mistake. Just am curious about the reasoning behind it

@ColCarroll
Copy link
Member

Sorry, I meant to do what Ari was suggesting, but messed up the pattern. Can fix tomorrow, unless you've got something ready!

@ColCarroll ColCarroll merged commit d841534 into arviz-devs:master Sep 3, 2018
@canyon289 canyon289 deleted the argument_bug branch September 6, 2018 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants