You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did you mean we should check for __eq__ when going for solution 2?
If so, this could be an additional safety net for most cases. Then, the modified solution 2 would only result in wrong narrowing for subtypes that override __eq__ strangely:
This Mypy code comment seems to favour solution 2.
I am asking because if Mypy would follow solution 2 or 3,
in
-based narrowing of optional types could be implemented more consistently.Related pull requests: #15760 #17154 #17044.
The text was updated successfully, but these errors were encountered: