issues: 911663002
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
911663002 | MDU6SXNzdWU5MTE2NjMwMDI= | 5438 | Add Union Operators for Dataset | 35968931 | closed | 0 | 2 | 2021-06-04T16:21:06Z | 2021-06-04T16:35:36Z | 2021-06-04T16:35:36Z | MEMBER | As of python 3.9, python dictionaries now support being merged via
```python def or(self, other): if not isinstance(other, xr.Dataset): return NotImplemented new = xr.merge(self, other) return new def ror(self, other): if not isinstance(other, xr.Dataset): return NotImplemented new = xr.merge(self, other) return new def ior(self, other): self.merge(other) return self ``` The distinction between the intent of these different operators is whether a new object is returned or the original object is updated. This would allow things like (This feature doesn't require python 3.9, it merely echoes a feature that is only available in 3.9+) |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/5438/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |