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
but type(NotImplemented) is actually a built-in NotImplementedType. As far as I can tell, NotImplementedType is not exposed anywhere in PY3 at static analysis time. We should add that and also tighten the type of NotImplemented so that we can type special methods more precisely. Otherwise it's difficult to distinguish between a special method that truly returns anything and one that always returns NotImplemented.
The text was updated successfully, but these errors were encountered:
llchan
changed the title
Add NotImplementedType and tighten NotImpelement type
Add NotImplementedType and tighten NotImplemented type
Apr 22, 2019
The current Any type is intentional and changing it is problematic; see Guido's comments in python/mypy#6710. As the discussion there makes clear, it's not clear that the changes proposed in this issue are going to be net positives.
Yeah, this was ticket was filed before the responses in the other ticket indicated that this was intentional. If you prefer to close this ticket and re-open if/when it becomes relevant again, feel free to do so.
We curently have
typeshed/stdlib/2and3/builtins.pyi
Line 1096 in fd57aee
but
type(NotImplemented)
is actually a built-inNotImplementedType
. As far as I can tell,NotImplementedType
is not exposed anywhere in PY3 at static analysis time. We should add that and also tighten the type ofNotImplemented
so that we can type special methods more precisely. Otherwise it's difficult to distinguish between a special method that truly returns anything and one that always returnsNotImplemented
.The text was updated successfully, but these errors were encountered: