home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 525260148

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/3268#issuecomment-525260148 https://api.github.com/repos/pydata/xarray/issues/3268 525260148 MDEyOklzc3VlQ29tbWVudDUyNTI2MDE0OA== 6213168 2019-08-27T11:30:22Z 2019-08-27T11:32:13Z MEMBER

The circular reference issue could also be worked around in a user-friendly way by having the decorator automatically add methods to the decorated class, copying the design of @dataclass:

```python import weakref

class C: def init(self, owner): self._owner = weakref.ref(owner) if hasattr(self, "post_init"): self.post_init()

@property
def owner(self):
    out = self._owner()
    if out is None:
        raise AttributeError("Orphaned accessor")
    return out

``` This would also allow for shallow copies to change the pointer.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  485708282
Powered by Datasette · Queries took 0.645ms · About: xarray-datasette