issue_comments: 428179704
This data as json
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/2473#issuecomment-428179704 | https://api.github.com/repos/pydata/xarray/issues/2473 | 428179704 | MDEyOklzc3VlQ29tbWVudDQyODE3OTcwNA== | 35968931 | 2018-10-09T12:52:30Z | 2018-10-09T14:53:30Z | MEMBER | Sorry for the triple comment, but I could also do this: If I do this: ```python @xr.register_dataset_accessor('bout') class BoutAccessor(object): def init(self, ds_object): self._data = ds_object
@register_dataset_accessor('storm') class StormAccessor(BoutAccessor): def init(self, ds_object): super().init(ds_object)
``` then I can have BOUT-specific attributes and methods stored via the bout accessor, all of which are inherited by the more-specific storm accessor ```python ds = collect_data(path) options_obj = get_options(path) ds.storm.set_options(options_obj) # access inherited methods from the bout accessor to store arbitrary extra data ds.storm.special_storm_plot() # use data from the bout accessor when calling more-specific methods form the storm accessor ``` However then my attached objects don't survive the calling of xarray methods:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
367763373 |