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/issues/1082#issuecomment-258690368,https://api.github.com/repos/pydata/xarray/issues/1082,258690368,MDEyOklzc3VlQ29tbWVudDI1ODY5MDM2OA==,941907,2016-11-06T16:02:36Z,2016-11-06T16:02:36Z,NONE,"I vote for warning by default. Raising an error brings more inconvenience than it's worth. Remember to warneach time, not just on first code run. On November 6, 2016 2:11:54 PM GMT+01:00, Stephan Hoyer notifications@github.com wrote: > On the mailing list, @rabernat wrote: > > > Also, how can I interactively develop an accessor? If I try to > > re-register under the same name, I get the error > > AccessorRegistrationError: cannot register accessor > '__main__.ExchAccessor'> under name 'exch' for type > 'xarray.core.dataset.Dataset'> because an attribute with that name > > already exists. > > In #1080, @smartass101 suggests: > > > Btw, perhaps it might be better to (perhaps optionally) issue a > > warning when overriding an existing class attribute during registering > > instead of completely refusing to do so. > > I think this is a good idea, and would nicely solve @rabernat's problem > (which might be your problem, too). We could add a new keyword argument > (e.g., `allow_override=True` or `warn=True` to `register_*_accessor`) > which switches to this new mode. > > Should it be the default behavior? It is also possible that warnings > instead of errors are enough in general. > > ## > > You are receiving this because you were mentioned. > Reply to this email directly or view it on GitHub: > https://github.com/pydata/xarray/issues/1082 ## Sent from my Android device with K-9 Mail. Please excuse my brevity. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,187560717