issue_comments: 902482335
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/5667#issuecomment-902482335 | https://api.github.com/repos/pydata/xarray/issues/5667 | 902482335 | IC_kwDOAMm_X841ysmf | 14371165 | 2021-08-20T07:06:19Z | 2021-08-20T07:10:16Z | MEMBER | Here's further tests to check how fast different class checkers are: ```python from typing import MutableMapping class Test2(MutableMapping): def init(self, args, kwargs): self.data = dict(args, **kwargs)
b = Test2() %timeit issubclass(type(b), MutableMapping) 711 ns ± 5.33 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) %timeit isinstance(b, MutableMapping) 853 ns ± 6.29 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) If you want to get really fast you can check for one of the required attributes MutableMapping has%timeit hasattr(b, "update") 82.6 ns ± 0.181 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) ```
|
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
958878760 |