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
Users can now get <uninhabited> in error messages when there are no constraints on a type variable. This should either be documented somewhere, or we should use a more self-explanatory string to display the type.
I would say a better more explanatory error is a better option. I didn't know what it meant till reading more about it, and I expect many others would be similarly confused.
Has there been any progress on this in the past five years?
I have Revealed type is "<nothing>" as an error message and I am not sure how to interpret it.
Reacted by Maximilian Roos, Jonas, Pedro Fonini, Sohang Chopra and Anton
Activity
emmatyping commentedon Mar 19, 2017
I would say a better more explanatory error is a better option. I didn't know what it meant till reading more about it, and I expect many others would be similarly confused.
ddfisher commentedon Mar 19, 2017
Agreed. Though actually the better option still might be to not infer UninhabitedType when there are no constraints on a type variable. (See #3032.)
[-]Document or explain "<uninhabited>"[/-][+]Document or explain "<nothing>"[/+]ilevkivskyi commentedon May 14, 2018
I just renamed the issue since
UninhabitedType()is currently formatted as<nothing>.GabrielMajeri commentedon May 29, 2020
I'm trying to determine where would be the proper place to document this type.
Would the Kind of types page be the correct location for it?
JukkaL commentedon Jun 8, 2020
These are related to type variables, so somewhere here would be a better location:
https://github.com/python/mypy/blob/master/docs/source/generics.rst
patrick-nicodemus commentedon Jan 30, 2023
Has there been any progress on this in the past five years?
I have
Revealed type is "<nothing>"as an error message and I am not sure how to interpret it.