Repository navigation
Commit ce186f4
authored
Allow 'in' operations with partial types (#8177)
This improves type inference in code like this:
```
d = {}
for k in f():
if k not in d:
d[k] = 0
else:
d[k] += 1
```
Unfortunately, this change breaks strict equality checking in 'in' operations
involving partial types. I'm not 100% sure this is a net improvement. I couldn't
find a clean way of getting strict equality working together with this.1 parent 387a911 commit ce186f4
2 files changed
Lines changed: 49 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2125 | 2125 | | |
2126 | 2126 | | |
2127 | 2127 | | |
2128 | | - | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
2129 | 2133 | | |
2130 | 2134 | | |
2131 | 2135 | | |
| |||
2206 | 2210 | | |
2207 | 2211 | | |
2208 | 2212 | | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
2209 | 2229 | | |
2210 | 2230 | | |
2211 | 2231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1738 | 1738 | | |
1739 | 1739 | | |
1740 | 1740 | | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
1741 | 1769 | | |
1742 | 1770 | | |
1743 | 1771 | | |
| |||
0 commit comments