Closed Tinche closed 11 months ago
Duplicate of #16489.
The behaviour change is as a result of this typeshed change: https://github.com/python/typeshed/pull/10679. The new behaviour is more accurate, and the change was made to fix a false negative that was reported by a user to typeshed: https://github.com/python/typeshed/issues/10678.
Cool, thanks. Wish we had a frozendict!
I tried searching for duplicates but I couldn't find any. GitHub issue search could be better :/
There's a change for sure, but I'm having trouble figuring out if the old or new behavior is correct.
I skimmed the Mypy changelog but didn't find much about this.
Quick reproducer:
On 1.6: no error. On 1.7:
The PEP gives the following pseudocode for
__or__
:So I guess the new behavior might be more correct? It feels less useful though.