Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document or explain "<nothing>" #3030

Open
ddfisher opened this issue Mar 19, 2017 · 6 comments
Open

Document or explain "<nothing>" #3030

ddfisher opened this issue Mar 19, 2017 · 6 comments

Comments

@ddfisher
Copy link
Collaborator

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.

@emmatyping
Copy link
Collaborator

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
Copy link
Collaborator Author

Agreed. Though actually the better option still might be to not infer UninhabitedType when there are no constraints on a type variable. (See #3032.)

@ilevkivskyi ilevkivskyi changed the title Document or explain "<uninhabited>" Document or explain "<nothing>" May 14, 2018
@ilevkivskyi
Copy link
Member

I just renamed the issue since UninhabitedType() is currently formatted as <nothing>.

@GabrielMajeri
Copy link

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
Copy link
Collaborator

JukkaL commented Jun 8, 2020

Would the Kind of types page be the correct location for it?

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants