home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 958177932

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/pull/5871#issuecomment-958177932 https://api.github.com/repos/pydata/xarray/issues/5871 958177932 IC_kwDOAMm_X845HKKM 14371165 2021-11-02T21:23:34Z 2021-11-02T21:23:34Z MEMBER

from __future__ import annotations does not actually directly enable the use of | for union, it changes the semantics of type annotations to postpone evaluation. In particular, you can then put just about anything in the type annotation without having any runtime behavior

pandas uses | and from __future__ import annotations quite frequently in order to avoid the Union, for example: https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/_core.py

Having typing not doing any runtime calculations sounds great to me. We usually don't need the typing variables during runtime anyway.

This can be merged as is. I just think it looks a little neater with |.

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