Skip to content

Document or explain "<nothing>" #3030

Open

Description

@ddfisher

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.

Activity

  1. emmatyping commented on Mar 19, 2017

    @emmatyping
    Member

    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.

  2. ddfisher commented on Mar 19, 2017

    @ddfisher
    CollaboratorAuthor

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

  3. changed the title [-]Document or explain "<uninhabited>"[/-] [+]Document or explain "<nothing>"[/+] on May 14, 2018
  4. ilevkivskyi commented on May 14, 2018

    @ilevkivskyi
    Member

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

  5. GabrielMajeri commented on May 29, 2020

    @GabrielMajeri

    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?

  6. JukkaL commented on Jun 8, 2020

    @JukkaL
    Collaborator

    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

  7. patrick-nicodemus commented on Jan 30, 2023

    @patrick-nicodemus

    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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions