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/3988#issuecomment-618249149,https://api.github.com/repos/pydata/xarray/issues/3988,618249149,MDEyOklzc3VlQ29tbWVudDYxODI0OTE0OQ==,1217238,2020-04-23T08:07:22Z,2020-04-23T08:07:22Z,MEMBER,"> there are a few of my questions / comments we can resolve by using something like > > ```python > class UncachedAccessor: > def __init__(self, accessor): > self._accessor = accessor > > def __get__(self, obj, cls): > if obj is None: > return self._accessor > > return self._accessor(obj) > ``` > > The only disadvantage is that now `pydoc` (or `help()`) show the accessor as a class. That was already the case for `str` and `dt`, but `plot` was a function. > > I think we could try to trick `inspect.getmembers` (which is used to decide which kind of output should be done), but that would require a lot of monkeypatching I'd rather not do. > > `pandas` simply uses the same docstring for the class and `__call__`, which is not ideal but a lot simpler. 👍 for a simple solution here like pandas rather than using inspect. I think it's probably actually slightly more accurate to show the class.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,603930174 https://github.com/pydata/xarray/pull/3988#issuecomment-618248201,https://api.github.com/repos/pydata/xarray/issues/3988,618248201,MDEyOklzc3VlQ29tbWVudDYxODI0ODIwMQ==,1217238,2020-04-23T08:05:24Z,2020-04-23T08:05:24Z,MEMBER,"This is a really clever yet simple fix. I like it! A few ideas for testing: - Verify that `DataArray.plot` returns the PlotMethods object. - Verify that `data_array.plot.__doc__` is still there.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,603930174 https://github.com/pydata/xarray/pull/3988#issuecomment-618245767,https://api.github.com/repos/pydata/xarray/issues/3988,618245767,MDEyOklzc3VlQ29tbWVudDYxODI0NTc2Nw==,1217238,2020-04-23T08:00:31Z,2020-04-23T08:00:31Z,MEMBER,"I think pandas might do something similar to do this? It might be worth checking, though it looks like you've figured most of it out already :)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,603930174