Commit 6790111
authored
Add __contains__ to MapKeys (#99)
I ran into this when I tried to pass `.keys()` to something declared
to take a `Collection`, and it failed because it lacked
`__contains__`. (I didn't actually care about `__contains__`, but mypy
did.)
So I came to add it to the stubs and discovered that it *was* actually
missing, and since the fallback is woefully slow I went and
implemented it.1 parent f797822 commit 6790111
3 files changed
+19
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2810 | 2810 | | |
2811 | 2811 | | |
2812 | 2812 | | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
2813 | 2826 | | |
2814 | 2827 | | |
2815 | 2828 | | |
| 2829 | + | |
2816 | 2830 | | |
2817 | 2831 | | |
2818 | 2832 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1395 | 1395 | | |
1396 | 1396 | | |
1397 | 1397 | | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
1398 | 1402 | | |
1399 | 1403 | | |
1400 | 1404 | | |
| |||
0 commit comments