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
{{ message }}
Repository navigation
None inferred as variable type from UninhabitedType #4104
Why is the definition of f() not considered an error?
Because it is not unsafe. As discussed in #2885 we can't prohibit all possible useless annotations. Moreover now we have #4066, so that I think the way forward is to prohibit empty bodies (so that one can't make a body for such annotations).
It may not be unsafe, but I'm pretty sure that whenever you see that, the user misunderstands what type variables are on a fundamental level (e.g. they confuse them with type aliases).
Activity
gvanrossum commentedon Oct 12, 2017
Why is the definition of f() not considered an error?
ilevkivskyi commentedon Oct 13, 2017
@gvanrossum
Because it is not unsafe. As discussed in #2885 we can't prohibit all possible useless annotations. Moreover now we have #4066, so that I think the way forward is to prohibit empty bodies (so that one can't make a body for such annotations).
gvanrossum commentedon Oct 13, 2017
It may not be unsafe, but I'm pretty sure that whenever you see that, the user misunderstands what type variables are on a fundamental level (e.g. they confuse them with type aliases).