issue_comments: 1195752253
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/6827#issuecomment-1195752253 | https://api.github.com/repos/pydata/xarray/issues/6827 | 1195752253 | IC_kwDOAMm_X85HRbs9 | 32801740 | 2022-07-26T17:10:02Z | 2022-07-26T18:15:38Z | CONTRIBUTOR | In the example the naming and meaning of the arguments of the Subclassing is often more reliable when it adheres to the Liskov Substitution Principle which states that objects of a superclass should be replaceable with objects of its subclasses and in other words: a subclass should only add functionality and not reduce it. There are some other workarounds though: If all you need is a convenient custom constructor then you could add a Another option is to convert your where your subclass may define as a convenience method: ``` def to_dataset(self): """Convert to plain Dataset.""" return xarray.Dataset(self, attrs=self.attrs) ```` |
{
"total_count": 2,
"+1": 2,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
1318173644 |