issue_comments: 368598394
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/1938#issuecomment-368598394 | https://api.github.com/repos/pydata/xarray/issues/1938 | 368598394 | MDEyOklzc3VlQ29tbWVudDM2ODU5ODM5NA== | 1217238 | 2018-02-26T18:22:33Z | 2018-02-26T18:22:33Z | MEMBER | I made a tweaked version of dispatching to list subtypes, which probably suitable for use in xarray: https://drive.google.com/file/d/18zdyUpWLNFzFaz08GUOC5vs1GxE_jHg-/view?usp=sharing Example behavior: ```python @dispatch(List[int]) def f(args): print('integers:', args) @dispatch(List[str]) def f(args): print('strings:', args) @dispatch(List[str, int]) def f(args): print('mixed str-int:', args) f([1, 2]) # integers: [1, 2] f([1, 2, 'foo']) # mixed str-int: [1, 2, 'foo'] f(['foo', 'bar']) # strings: ['foo', 'bar'] f([[1, 2]]) # NotImplementedError: Could not find signature for f: <List[list]> ``` Differences from @llllllllll's It would be straightforward to adapt this to use |
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
299668148 |