html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/pull/3336#issuecomment-569074436,https://api.github.com/repos/pydata/xarray/issues/3336,569074436,MDEyOklzc3VlQ29tbWVudDU2OTA3NDQzNg==,2818208,2019-12-26T15:14:45Z,2019-12-26T15:14:45Z,CONTRIBUTOR,"The more I think about this PR, the more I dislike this approach. The solution must either be brittle or over-engineered. I discussed this issue with a friend, and other approaches don't seem better: currying the function—`arr.sel(method=""nearest"")(method=""foo"")`—or adding a decorator that caches the results of a stripped down `inspect.signature`. I think the best approach is to just raise a `ValueError` if certain string arguments are not in a predefined set of choices:
```
if method not in [""nearest"", ...]:
raise ValueError(...)
```
@max-sixty, @dcherian, @shoyer thoughts?
---
Not to open a can of worms, but the root cause of this issue is that the Xarray API accepts both `**kwargs` and ordinary named args. This PR—and methods like `either_dict_or_kwargs`—seems like workarounds to accommodate this model. Is there any interest in moving away from this API long-term?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,497416198
https://github.com/pydata/xarray/pull/3336#issuecomment-564076665,https://api.github.com/repos/pydata/xarray/issues/3336,564076665,MDEyOklzc3VlQ29tbWVudDU2NDA3NjY2NQ==,2818208,2019-12-10T15:08:55Z,2019-12-10T15:08:55Z,CONTRIBUTOR,"I'm almost done with classes and am happy to return to this if there is any interest. I don't want to design something brittle, though, and would love some guidance.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,497416198