home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1132117191

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/6142#issuecomment-1132117191 https://api.github.com/repos/pydata/xarray/issues/6142 1132117191 IC_kwDOAMm_X85DerzH 5635139 2022-05-19T19:28:04Z 2022-05-19T19:28:04Z MEMBER

Only remotely related to this issue, but would it help to type the dimension (or variable names etc) Mappings with covariant Hashable keys to prevent the issue that {"a":1} is incompatible with Mapping[Hashable, Any]?

I spent a non-trivial amount of time on this a year ago or so — my understanding is that Mapping was not covariant in its keys, exactly as you point out.

But I'm also not sure we lose anything with Mapping[Any, foo] — the key needs to be Hashable anyway. I don't have a strong objection, but do we gain anything?

e.g. https://mypy-play.net/?mypy=latest&python=3.10&gist=a3ea9f6fce5a678803bd7563a54cd9ca

See https://mypy-play.net/?mypy=latest&python=3.10&gist=b2c27a5ca4aad9e8ce63cd74dc4032b0

Very cool! I didn't even know about this.

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